Skip to content

Commit 76489f9

Browse files
Sebastian McKenziebestander
authored andcommitted
Put yarn into silent mode when calling nested yarn run commands (#3536)
1 parent db5edea commit 76489f9

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/cli/commands/run.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ export async function run(config: Config, reporter: Reporter, flags: Object, arg
7575
}
7676

7777
if (cmds.length) {
78+
// propagate YARN_SILENT env variable to executed commands
79+
process.env.YARN_SILENT = '1';
7880
for (const [stage, cmd] of cmds) {
7981
// only tack on trailing arguments for default script, ignore for pre and post - #1595
8082
const defaultScriptCmd = `${cmd} ${sanitizedArgs(args).join(' ')}`;

src/cli/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ const reporter = new Reporter({
118118
emoji: process.stdout.isTTY && commander.emoji,
119119
verbose: commander.verbose,
120120
noProgress: !commander.progress,
121-
isSilent: commander.silent,
121+
isSilent: process.env.YARN_SILENT === '1' || commander.silent,
122122
});
123123

124124
reporter.initPeakMemoryCounter();

0 commit comments

Comments
 (0)