Skip to content

Commit

Permalink
fix: raise condition for command exec result
Browse files Browse the repository at this point in the history
  • Loading branch information
angrybayblade committed Jun 5, 2024
1 parent c037b3e commit 1abb697
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions electron/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 1abb697

Please sign in to comment.