Skip to content

Commit

Permalink
Fix allowNonzeroExitCode option (#296)
Browse files Browse the repository at this point in the history
  • Loading branch information
xirzec authored Feb 8, 2023
1 parent 4cf1a6d commit 051edca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ const baseOpen = async options => {
subprocess.once('error', reject);

subprocess.once('close', exitCode => {
if (options.allowNonzeroExitCode && exitCode > 0) {
if (!options.allowNonzeroExitCode && exitCode > 0) {
reject(new Error(`Exited with code ${exitCode}`));
return;
}
Expand Down

0 comments on commit 051edca

Please sign in to comment.