From 051edcae8f698905e2544a5bb3163bd70a185dab Mon Sep 17 00:00:00 2001 From: Jeff Fisher Date: Wed, 8 Feb 2023 06:18:53 -0600 Subject: [PATCH] Fix `allowNonzeroExitCode` option (#296) --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 7ad8122..72d1cdc 100644 --- a/index.js +++ b/index.js @@ -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; }