-
Notifications
You must be signed in to change notification settings - Fork 85
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
[eas-cli] Silence all non-command output in non-interactive mode of eas env:exec #2800
base: main
Are you sure you want to change the base?
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Size Change: -1.63 kB (0%) Total Size: 53.4 MB
|
Subscribed to pull request
Generated by CodeMention |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2800 +/- ##
==========================================
- Coverage 52.52% 52.49% -0.03%
==========================================
Files 583 583
Lines 22589 22602 +13
Branches 4452 4458 +6
==========================================
Hits 11862 11862
- Misses 10692 10705 +13
Partials 35 35 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like a good idea overall, thanks 🙏
I have one suggestion:
09c685e
to
163c212
Compare
✅ Thank you for adding the changelog entry! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks reasonable to me, thanks! 🙏
Why
When using this programmatically to run a command,
env:exec
shouldn't modify the stdout of the sub-command. This makes it possible to run a JSON command, for example.Concretely, this came up in https://github.com/expo/expo-github-action/pull/316/files#diff-9a4c8863ad4d04f246a265d420c404b948ffcd8902e7de5312c9205cd034fa2eR226 where we are trying to run
npx expo-updates fingerprint:generate
which outputs JSON.How
One solution (this solution) is to slightly overload the
non-interactive
flag to also silence all non-command output. Alternatively we could add a separate flag.I chose to overload the existing flag since I couldn't think of a reason that a non-interactive scenario would want the
Log.log
calls. That being said, I'm open to adding a separate flag like--raw
or--passthrough
or something else if overloading the flag is not desired.Test Plan
Before:
After:
Other tests:
Does not print hello since subcommand had nonzero exit status:
Ensure output (no output) matches:
Prints hello after config (correct success exit status):
Ensure output (no output) matches: