Changed prompt lib, updated cli's

- fixes #252
This commit is contained in:
Wyatt Johnson
2017-01-30 17:46:09 -07:00
parent b75557912f
commit e6ef4b615f
14 changed files with 282 additions and 213 deletions
+3 -1
View File
@@ -20,6 +20,8 @@ util.shutdown = (defaultCode = 0, signal = null) => {
debug(`Reached ${signal} signal`);
}
debug(`${util.toshutdown.length} jobs now being called`);
Promise
.all(util.toshutdown.map((func) => func ? func(signal) : null).filter((func) => func))
.then(() => {
@@ -41,7 +43,7 @@ util.shutdown = (defaultCode = 0, signal = null) => {
*/
util.onshutdown = (jobs) => {
debug(`${jobs.length} jobs registered`);
debug(`${jobs.length} jobs registered to be called during shutdown`);
// Add the new jobs to shutdown to the object reference.
util.toshutdown = util.toshutdown.concat(jobs);