From 460c32a3378ef36a6507c3cede3b3abc5d495f9f Mon Sep 17 00:00:00 2001 From: Nikola Jokic <97525037+nikola-jokic@users.noreply.github.com> Date: Wed, 23 Feb 2022 15:51:09 +0100 Subject: [PATCH] Repaired hashFiles call so if error was thrown, it was returned to process invoker (#1678) * hashFiles.ts added exit status on promise action * generated layoutbin/hashfiles/index.js --- src/Misc/expressionFunc/hashFiles/src/hashFiles.ts | 8 ++++++++ src/Misc/layoutbin/hashFiles/index.js | 10 +++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/Misc/expressionFunc/hashFiles/src/hashFiles.ts b/src/Misc/expressionFunc/hashFiles/src/hashFiles.ts index fa526f77b..bb72be0f3 100644 --- a/src/Misc/expressionFunc/hashFiles/src/hashFiles.ts +++ b/src/Misc/expressionFunc/hashFiles/src/hashFiles.ts @@ -53,3 +53,11 @@ async function run(): Promise { } run() + .then(out => { + console.log(out) + process.exit(0) + }) + .catch(err => { + console.error(err) + process.exit(1) + }) diff --git a/src/Misc/layoutbin/hashFiles/index.js b/src/Misc/layoutbin/hashFiles/index.js index 6dfae5334..8540dc1f4 100644 --- a/src/Misc/layoutbin/hashFiles/index.js +++ b/src/Misc/layoutbin/hashFiles/index.js @@ -1621,7 +1621,15 @@ function run() { } }); } -run(); +run() + .then(out => { + console.log(out); + process.exit(0); +}) + .catch(err => { + console.error(err); + process.exit(1); +}); /***/ }),