health-check: change exit code on failure
This commit is contained in:
parent
72b8951704
commit
17dca691a4
|
@ -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