From b03f917d7a99e33135c7c7e9d6a873e10336db70 Mon Sep 17 00:00:00 2001 From: Gareth Jones Date: Mon, 19 Oct 2020 08:53:08 +1300 Subject: [PATCH] fix: don't suppress run output when `--silent` is passed --- lib/run-script.js | 2 +- test/lib/run-script.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/run-script.js b/lib/run-script.js index 90f11270c65d1..989936f2546a9 100644 --- a/lib/run-script.js +++ b/lib/run-script.js @@ -69,7 +69,7 @@ const runScript = async (args) => { path, args, scriptShell, - stdio: log.level === 'silent' ? 'pipe' : 'inherit', + stdio: 'inherit', stdioString: true, pkg } diff --git a/test/lib/run-script.js b/test/lib/run-script.js index 0bb0c056b006b..9f48b8f59bbeb 100644 --- a/test/lib/run-script.js +++ b/test/lib/run-script.js @@ -284,13 +284,13 @@ t.test('run silent', async t => { t.match(RUN_SCRIPTS, [ { event: 'preenv', - stdio: 'pipe' + stdio: 'inherit' }, { path: npm.localPrefix, args: [], scriptShell: undefined, - stdio: 'pipe', + stdio: 'inherit', stdioString: true, pkg: { name: 'x', version: '1.2.3', _id: 'x@1.2.3', scripts: { env: 'env' @@ -299,7 +299,7 @@ t.test('run silent', async t => { }, { event: 'postenv', - stdio: 'pipe' + stdio: 'inherit' } ]) })