1
1
mirror of https://github.com/primer/css.git synced 2024-11-24 13:15:00 +03:00

fail safely on rc

This commit is contained in:
Jon Rohan 2017-10-24 15:33:35 -07:00
parent 711c1d5c6c
commit 880f89f811

View File

@ -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))
}