From 1abb697f76e7273e47a4c556e1fdde4933c86a7e Mon Sep 17 00:00:00 2001 From: angrybayblade Date: Wed, 5 Jun 2024 12:35:23 +0530 Subject: [PATCH] fix: raise condition for command exec result --- electron/install.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/electron/install.js b/electron/install.js index 79f2a1bcc..31c7512e8 100644 --- a/electron/install.js +++ b/electron/install.js @@ -79,13 +79,15 @@ function runCmdUnix(command, options) { if (output.stderr) { appendLog(output.stdout.toString()); } - if (output.error || output.stderr.length > 0) { + if (output.error) { throw new Error( `Error running ${command} with options ${options}; Error: ${output.error}; Stdout: ${output.stdout}; Stderr: ${output.stderr}`, ); } - console.log(appendLog(`Executed ${command} ${options} with output:\n${output.stdout}`)) + console.log(appendLog(`Executed ${command} ${options} with`)) + console.log(appendLog(`===== stdout ===== \n${output.stdout}`)) + console.log(appendLog(`===== stderr ===== \n${output.stderr}`)) } function runSudoUnix(command, options) {