From 72e12048268bb0c5c955d20dea840d3cc3f8e137 Mon Sep 17 00:00:00 2001 From: andreacavalli Date: Thu, 19 Mar 2020 00:42:16 +0100 Subject: [PATCH] Update 'scripting.js' --- scripting.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripting.js b/scripting.js index 5c61532..a687413 100644 --- a/scripting.js +++ b/scripting.js @@ -27,7 +27,8 @@ async function bash(bashScript, options) { for await (const chunk of child.stderr) { error += chunk; } - const exitCode = await new Promise( (resolve, reject) => { child.on('close', resolve); }); + + const exitCode = await new Promise((resolve, reject) => child.on('close', resolve)); if (exitCode) { throw new Error( `subprocess error exit ${exitCode}, ${error}`);