Repository navigation
Conversation
d0c7d9e to
0559704
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## vonovak/dependency-notice-tty #4592 +/- ##
=================================================================
- Coverage 74.48% 74.48% -0.00%
=================================================================
Files 1029 1029
Lines 50390 50393 +3
Branches 10891 10891
=================================================================
Hits 37528 37528
- Misses 11872 11875 +3
Partials 990 990 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
0559704 to
3cb54f7
Compare
|
Subscribed to pull request
Generated by CodeMention Warning: The preamble and epilogue options in commentConfiguration are deprecated. Use template instead. |
|
eas-cli now uses changesets for changelogs (#4580). The required "Check for a changeset" check fails on PRs that edit To update this PR:
The release adds the PR link and the author to the entry. If this PR needs no changelog entry, revert the |
EasCommand.catch printed the reason with Log.error, which writes to stdout. oclif then printed "<command> command failed." to stderr. A program that reads stderr for the error found only that generic line. Only the catch changes. Other Log.error and Log.warn calls stay on stdout, because some of them are not failures and the spinner keeps non-TTY output off stderr on purpose. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
3cb54f7 to
e9ab32e
Compare
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
✅ Thank you for adding a changeset! |
Why
When a command fails,
EasCommand.catchprints the (helpful) reason withLog.error, which writes to stdout. Then oclif prints<command> command failed.to stderr. A program that reads stderr for the error finds only the generic (not helpful) line.Stacked on #4591. This is the second of four PRs: #4591 ← #4592 (this PR) ← #4593 ← #4594.
How
Add
Log.errorToStderrand use it inEasCommand.catchonly. OtherLog.errorandLog.warncalls stay on stdout:Log.errorcalls are not failures and exit 0, for example inenv:getandenv:delete.ora.tskeeps non-TTY output on stdout on purpose, because some CI systems treat stderr as a failure. A failing command already writes to stderr through oclif, so this PR adds no new stderr output to a run that succeeds.With
--json, nothing changes: stdout was already redirected to stderr.Trade-off: a program that reads stderr for errors now finds the reason there, and a program that parses stdout no longer gets the reason mixed into it. A program that reads the reason from stdout must read stderr instead, so the changelog lists this under breaking changes. The callers in this repo that run eas-cli (build-tools and eas-build-cache-provider) read stdout only on success. On failure they log stderr or merge both streams.
Known limit:
Log.errorToStderruses chalk, which picks its color level from stdout. Witheas ... 2>err.login a terminal, the file gets color codes.LLM Authorship
Test Plan
build:list --non-interactive: the reason (Either log in with eas login ...) is on stderr, next toError: build:list command failed.. On 24.12.1 it was on stdout.tsc,oxlintandoxfmtare clean.🤖 Generated with Claude Code