Skip to content
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

Do not log err.message of ProcessTermErrors if silent #7472

Merged
merged 2 commits into from
Aug 16, 2019

Conversation

kaste
Copy link
Contributor

@kaste kaste commented Aug 12, 2019

Fixes #5359

If sub commands called via yarn run fail yarn typically logs error Command failed with exit code 1. even if --silent is requested basically because a failing command throws (or rethrows) itself instead of just returning this failure as valid output.

This is the simplest patch to suppress this output.

@buildsize
Copy link

buildsize bot commented Aug 12, 2019

File name Previous Size New Size Change
yarn-[version].noarch.rpm 1.18 MB 1.18 MB -20 bytes (0%)
yarn-[version].js 4.85 MB 4.85 MB 134 bytes (0%)
yarn-legacy-[version].js 5.05 MB 5.05 MB 134 bytes (0%)
yarn-v[version].tar.gz 1.18 MB 1.19 MB 1.94 KB (0%)
yarn_[version]all.deb 868.44 KB 868.78 KB 354 bytes (0%)

@kaste
Copy link
Contributor Author

kaste commented Aug 12, 2019

Of course the tests don't fail on my machine. 🙄

@kaste
Copy link
Contributor Author

kaste commented Aug 12, 2019

Well, still looks like YARN_SILENT is actually set here. Inherited from the parent? (But you do have tests in the same file where you set it explicitly.)

For now, I just unset YARN_SILENT.

Still, everything red bc the RequestManager times out/cert invalid. Disappointing for a first time contrib 😞 🤷‍♀

@arcanis
Copy link
Member

arcanis commented Aug 16, 2019

Still, everything red bc the RequestManager times out/cert invalid. Disappointing for a first time contrib 😞 🤷‍♀

Apologies - my attention is like at 99% focused on the v2 at this point, so I get less time to fix (or even see) this kind of things 😕

Your contrib looks fine apart from the CA things that are on us, so I'll plan it for the 1.18. Thanks!

@arcanis arcanis merged commit 7575b1f into yarnpkg:master Aug 16, 2019
@kaste kaste deleted the fix-5359 branch August 16, 2019 20:38
VincentBailly pushed a commit to VincentBailly/yarn that referenced this pull request Jun 10, 2020
* Do not log `err.message` of `ProcessTermError`s if silent

Fixes yarnpkg#5359

* Ensure `YARN_SILENT=0` by default in the integration tests
VincentBailly pushed a commit to VincentBailly/yarn that referenced this pull request Jun 10, 2020
* Do not log `err.message` of `ProcessTermError`s if silent

Fixes yarnpkg#5359

* Ensure `YARN_SILENT=0` by default in the integration tests
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.

yarn run --silent doesn't suppress yarn's stderr
2 participants