Skip to content

Commit

Permalink
Put yarn into silent mode when calling nested yarn run commands (#3536
Browse files Browse the repository at this point in the history
)
  • Loading branch information
Sebastian McKenzie authored and bestander committed May 30, 2017
1 parent db5edea commit 76489f9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/cli/commands/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ export async function run(config: Config, reporter: Reporter, flags: Object, arg
}

if (cmds.length) {
// propagate YARN_SILENT env variable to executed commands
process.env.YARN_SILENT = '1';
for (const [stage, cmd] of cmds) {
// only tack on trailing arguments for default script, ignore for pre and post - #1595
const defaultScriptCmd = `${cmd} ${sanitizedArgs(args).join(' ')}`;
Expand Down
2 changes: 1 addition & 1 deletion src/cli/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ const reporter = new Reporter({
emoji: process.stdout.isTTY && commander.emoji,
verbose: commander.verbose,
noProgress: !commander.progress,
isSilent: commander.silent,
isSilent: process.env.YARN_SILENT === '1' || commander.silent,
});

reporter.initPeakMemoryCounter();
Expand Down

0 comments on commit 76489f9

Please sign in to comment.