Don’t exit immediately after a bad viewBox match

This commit is contained in:
Jed Fox 2017-09-25 16:49:58 -04:00
parent 89f293f251
commit 9d0735b7fc

View file

@ -64,8 +64,9 @@ xml2js.parseString(file, function(err, result: XML2JSResult) {
const viewBoxMatch = viewBoxRe.exec(viewBox)
if (!viewBoxMatch) {
console.error(`Unexpected viewBox format for ${id}`)
process.exit(1)
console.error(`*** ERROR! Unexpected viewBox format for ${id}`)
process.exitCode = 1
return
}
const [, w, h] = viewBoxMatch