Skip to content

fix(plugin-commands-script-runners): align runRecursive with how run assigns silent loglevel#8302

Merged
zkochan merged 2 commits intopnpm:mainfrom
antitoxic:respect-silent-loglevel-in-recursive-script-run
Jul 14, 2024
Merged

fix(plugin-commands-script-runners): align runRecursive with how run assigns silent loglevel#8302
zkochan merged 2 commits intopnpm:mainfrom
antitoxic:respect-silent-loglevel-in-recursive-script-run

Conversation

@antitoxic
Copy link
Copy Markdown
Contributor

@antitoxic antitoxic commented Jul 11, 2024

Fixes #7608


I originally reported the issue a few months ago. Now it's blocking our infrastructure plans so I put the time to fix it myself. This only adds a line that is likely forgotten in the original implementation.

The bug was that if you have recursive runs to pnpm or if a script in package.json calls pnpm again (which probably is the same as recursive run) then the calls don't respect the --silent argument.

I found the commit by @zkochan from 4 years ago that made silent mode work: 76aaead#diff-c0a21f7925dd7f02d9af2aeb8297f31b6eb5a6bbe684bd7e2344a34f26bbd4e3

And what I can see there is that the lifeCycleOptions in run.ts has this:

silent: opts.reporter === 'silent',

And the lifeCycleOptions in runRecursive.ts didn't have this. Once I added it all worked out! 🎉

@antitoxic antitoxic requested a review from zkochan as a code owner July 11, 2024 19:11
@welcome
Copy link
Copy Markdown

welcome bot commented Jul 11, 2024

💖 Thanks for opening this pull request! 💖
Please be patient and we will get back to you as soon as we can.

@zkochan zkochan merged commit 999d2ef into pnpm:main Jul 14, 2024
@welcome
Copy link
Copy Markdown

welcome bot commented Jul 14, 2024

Congrats on merging your first pull request! 🎉🎉🎉

@zkochan
Copy link
Copy Markdown
Member

zkochan commented Jul 14, 2024

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Nested pnpm calls don't respect any of npm_config_report=silent, --silent, --reporter=silent or --loglevel=silent

2 participants