Skip to content

Commit 2636fe1

Browse files
macnoruyadorno
authored andcommitted
fix: in run-script, if loglevel is silent, disable banner option
Fixes issue #2023 PR-URL: #2086 Credit: @macno Close: #2086 Reviewed-by: @nlf
1 parent 2a680e9 commit 2636fe1

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

lib/run-script.js

+1
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ const runScript = async (args) => {
7171
stdio: 'inherit',
7272
stdioString: true,
7373
pkg,
74+
banner: log.level !== 'silent',
7475
}
7576

7677
for (const [event, args] of events) {

test/lib/run-script.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,7 @@ t.test('skip pre/post hooks when using ignoreScripts', async t => {
253253
postenv: 'echo after the env',
254254
env: 'env'
255255
} },
256+
banner: true,
256257
event: 'env'
257258
}
258259
])
@@ -295,7 +296,8 @@ t.test('run silent', async t => {
295296
pkg: { name: 'x', version: '1.2.3', _id: '[email protected]', scripts: {
296297
env: 'env'
297298
} },
298-
event: 'env'
299+
event: 'env',
300+
banner: false
299301
},
300302
{
301303
event: 'postenv',

0 commit comments

Comments
 (0)