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

feat(foreach)!: automatically enable --verbose in tty environments #4595

Merged
merged 2 commits into from
Jul 1, 2022

Conversation

paul-soporan
Copy link
Member

What's the problem this PR addresses?

One of the 4.x items in #3591: automatically enabling the -v,--verbose flag of yarn workspaces foreach inside TTY environments.

The reasoning behind this is the fact that it's a lot more useful to see what output comes from which workspace, and it's consistent with what we do in @yarnpkg/shell with background jobs (only enabling verbose output and prefixes in TTYs).

How did you fix it?

Added an isTTY check.

I've also tried to add tests for it, but I can't trick child_process / cross-spawn / execUtils into making the process think it's running inside a TTY.

Because of this, the only alternative I see is using node-pty and processing the output, which is something I wouldn't wish on my worst enemy, so no tests for now.

Checklist

  • I have set the packages that need to be released for my changes to be effective.
  • I will check that all automated PR checks pass before the PR gets reviewed.

@paul-soporan paul-soporan mentioned this pull request Jun 30, 2022
13 tasks
CHANGELOG.md Outdated Show resolved Hide resolved
@arcanis arcanis merged commit 354dde2 into master Jul 1, 2022
@arcanis arcanis deleted the paul/feat/foreach-tty branch July 1, 2022 07:34
@merceyz merceyz added this to the 4.0.0 milestone May 8, 2023
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.

3 participants