Merge pull request #882 from SkynetLabs/change-exit-code-on-failure
Change exit code on failure
This commit is contained in:
commit
b81a6b82ca
|
@ -38,5 +38,10 @@ require("yargs/yargs")(process.argv.slice(2)).command(
|
||||||
.push(entry) // insert new record
|
.push(entry) // insert new record
|
||||||
.remove(({ date }) => date < getYesterdayISOString()) // drop old records
|
.remove(({ date }) => date < getYesterdayISOString()) // drop old records
|
||||||
.write();
|
.write();
|
||||||
|
|
||||||
|
// exit with code 1 if any of the checks report failure
|
||||||
|
if (checks.some(({ up }) => !up)) {
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
).argv;
|
).argv;
|
||||||
|
|
Reference in New Issue