From 4e58274ed0fd2dd29d3c8d6c7c47f37a37dc0f0f Mon Sep 17 00:00:00 2001 From: isaacs Date: Fri, 19 Feb 2021 20:39:12 -0800 Subject: Do not print error banner for shell proxy commands There are a few commands (exec, run-script, and the run-script proxies) where essentially npm is acting like a very fancy shell. It is peculiar and noisy for npm to print a verbose error banner at the end of these commands, since presumably the command itself already did whatever it had to do to report the error appropriately. For example, `npm test` runs a test script, usually outputting test results. Having npm then tell me that my tests failed with exit status 1 and print a debug log, is unnecessary and unwanted. When the error encountered for these commands does not have a non-zero numeric 'code', then we still print the standard npm error reporting messages, because presumably something went wrong OTHER than a process exiting with a non-zero status code. PR-URL: https://github.com/npm/cli/pull/2742 Credit: @isaacs Close: #2742 Reviewed-by: @nlf --- tap-snapshots/test-lib-utils-cmd-list.js-TAP.test.js | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tap-snapshots') diff --git a/tap-snapshots/test-lib-utils-cmd-list.js-TAP.test.js b/tap-snapshots/test-lib-utils-cmd-list.js-TAP.test.js index 1c91975c7..55ed4e664 100644 --- a/tap-snapshots/test-lib-utils-cmd-list.js-TAP.test.js +++ b/tap-snapshots/test-lib-utils-cmd-list.js-TAP.test.js @@ -173,6 +173,14 @@ Object { "birthday", "help-search", ], + "shellouts": Array [ + "exec", + "run-script", + "test", + "start", + "stop", + "restart", + ], "shorthands": Object { "c": "config", "cit": "install-ci-test", -- cgit v1.2.3