Skip to content

Commit

Permalink
fail safely on rc
Browse files Browse the repository at this point in the history
  • Loading branch information
jonrohan committed Oct 24, 2017
1 parent 711c1d5 commit 880f89f
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions script/release-candidate
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,15 @@ const depFields = [
]

const getUpdated = (args) => {
return execa(lernaBin, ['updated', '--json'])
.then(res => JSON.parse(res.stdout))
return execa(lernaBin, ['updated', '--json'], { reject: false })
.then(res => {
if (res.stdout == "") {
console.warn("No packages need updating")
return []
} else {
return JSON.parse(res.stdout)
}
})
.then(updated => updated.map(pkg => pkg.name))
}

Expand Down

0 comments on commit 880f89f

Please sign in to comment.