-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Put yarn into silent mode when calling nested yarn run
commands
#3536
Conversation
This looks cleaner, but one counterpoint to this change is that it was useful to see when you were accidentally invoking a different version of yarn. For example, my CI build uses frontend-maven-plugin to to install its own version of yarn, and then runs my 'yarn package' script from package.json. Like your example, my 'yarn build' called other yarn commands, and I noticed that the secondary yarn calls were being run not with my CI-installed yarn, but instead the one installed globally on the machine. I realize there are other ways of fixing and working around that issue, but having the versions show up in the logs helped me discover the problem. If there's some way to ensure that the nested yarn call is using the same yarn executable as the parent call, then I would see no issue with this change. I hope this is worth discussing... Thanks |
Thanks for raising the question.
For sure worth discussing.
Although I don't think that checking log lines is a robust solution for
ensuring that you run the same yarn.
Maybe forcing yarn binary location to the beginning of PATH would work
better?
…On Thu, 1 Jun 2017 at 20:01, Malcolm Dwyer ***@***.***> wrote:
This looks cleaner, but one counterpoint to this change is that it was
useful to see when you were accidentally invoking a different version of
yarn.
For example, my CI build uses frontend-maven-plugin to to install its own
version of yarn, and then runs my 'yarn package' script from package.json.
Like your example, my 'yarn build' called other yarn commands, and I
noticed that the secondary yarn calls were being run not with my
CI-installed yarn, but instead the one installed globally on the machine.
I realize there are other ways of fixing and working around that issue,
but having the versions show up in the logs helped me discover the problem.
If there's some way to ensure that the nested yarn call is using the same
yarn executable as the parent call, then I would see no issue with this
change.
I hope this is worth discussing... Thanks
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#3536 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ACBdWPXnQGPRXx_CLkNdhBy9DESU6bYNks5r_wqGgaJpZM4Nqngb>
.
|
**Summary** Fixes #3536. Explicitly and programmatically passes `YARN_SILENT=0` to test runs that checks yarn's output. **Test plan** All CI tests and local test runs with yarn 0.27.3 should pass.
**Summary** Fixes #3536. Explicitly and programmatically passes `YARN_SILENT=0` to test runs that checks yarn's output. **Test plan** All CI tests and local test runs with yarn 0.27.3 should pass.
Hi! Unfortunately this has broken a number of workflows (#3671, #4423, #3767, guigrpa/oao#50), and as such I think we should consider reverting it for now, and later replacing it with a solution that suppresses just the header/footer output (ie versions and timing info) rather than the entire command output. For that I've opened #4615. Nothing's ever straight-forwards is it! :-) |
Thanks for raising, commenting in the new issue |
Summary
This changes
yarn run
commands causing all child yarn processes to go into silent mode. This is useful as when you have a lot of nested scripts it can lead to a lot of stdout thrash with the yarn header CLI header and footer.Before
After
Test plan
With a
package.json
of:produces the output of:
Note that the the
yarn bar
call in thefoo
script does not include the yarn CLI header/footer.