From 2465341feec8b62324bdabf3e5281f17ac56e9ea Mon Sep 17 00:00:00 2001 From: undergroundwires Date: Sun, 24 Jul 2022 14:33:53 +0200 Subject: [PATCH] Fix exiting with error code when help is called `--help` is an accepted option and should not return `1` (error) as exit code but success `0`. However, the CLI will still return `0` if help text is forced due to missing URL. --- src/drivers/npm/cli.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/drivers/npm/cli.js b/src/drivers/npm/cli.js index 6274fe5c9..e3b243f57 100755 --- a/src/drivers/npm/cli.js +++ b/src/drivers/npm/cli.js @@ -91,8 +91,7 @@ Options: -N, --no-redirect Disable cross-domain redirects -e, --extended Output additional information `) - - process.exit(1) + process.exit(options.help ? 0 : 1) } const headers = {}