Skip to content

Commit 880f89f

Browse files
committed
fail safely on rc
1 parent 711c1d5 commit 880f89f

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

script/release-candidate

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,15 @@ const depFields = [
2727
]
2828

2929
const getUpdated = (args) => {
30-
return execa(lernaBin, ['updated', '--json'])
31-
.then(res => JSON.parse(res.stdout))
30+
return execa(lernaBin, ['updated', '--json'], { reject: false })
31+
.then(res => {
32+
if (res.stdout == "") {
33+
console.warn("No packages need updating")
34+
return []
35+
} else {
36+
return JSON.parse(res.stdout)
37+
}
38+
})
3239
.then(updated => updated.map(pkg => pkg.name))
3340
}
3441

0 commit comments

Comments
 (0)