Skip to content

[eas-cli] Improve non-interactive error for unconfigured projects - #4153

Open
williamgrosset wants to merge 4 commits into
mainfrom
williamgrosset/improve-unlinked-project-error
Open

[eas-cli] Improve non-interactive error for unconfigured projects#4153
williamgrosset wants to merge 4 commits into
mainfrom
williamgrosset/improve-unlinked-project-error

Conversation

@williamgrosset

@williamgrosset williamgrosset commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Why

The current error tells users to run eas init, but that command needs interaction and fails under the same conditions that produced the error.

How

Extract one builder, getUnconfiguredProjectError, and call it from all three throw sites. Every path now lists both recovery commands with their required flags, plus the accounts the user can create projects in. Also suppress the EAS project not configured. log warning in non-interactive mode, since every error message now states it.

Test Plan

Updated the existing tests to assert the message on each path. Added a test showing that a single-account actor in non-interactive mode reaches the project fetch, which is where its error now comes from.

Manually verified with a local build running project:info --non-interactive:

Screenshot 2026-08-05 at 6 02 42 PM

@williamgrosset
williamgrosset force-pushed the williamgrosset/improve-unlinked-project-error branch from 3331566 to b0e1b7e Compare August 5, 2026 16:25
@codecov

codecov Bot commented Aug 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 62.47%. Comparing base (a3a1d84) to head (850c668).
⚠️ Report is 8 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4153      +/-   ##
==========================================
+ Coverage   62.43%   62.47%   +0.05%     
==========================================
  Files        1009     1009              
  Lines       45737    45781      +44     
  Branches     9622     9635      +13     
==========================================
+ Hits        28550    28599      +49     
+ Misses      15726    15721       -5     
  Partials     1461     1461              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@williamgrosset
williamgrosset marked this pull request as ready for review August 5, 2026 16:43
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

Subscribed to pull request

File Patterns Mentions
packages/eas-cli/** @douglowder

Generated by CodeMention

Warning: The preamble and epilogue options in commentConfiguration are deprecated. Use template instead.

@brentvatne brentvatne added the ai-review Commits pushed to PRs with this label be automatically reviewed. label Aug 5, 2026
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

🤖 AI code review

Decision: Approve

Overall PR risk: Low. The change modifies existing behavior: it rewrites the error text on the non-configured-project paths (robot-token, non-interactive multi-account, and write-to-config paths) and limits the EAS project not configured. warning log to interactive mode only. No reviewer found a correctness, security, or consistency defect. The main plausible breakage is external scripts or tests that match the old error string, since the wording changes on all three paths; control flow, exit codes, and the thrown error type stay the same. Blast radius is small (message text in two files plus one new helper file), and rollback is a direct revert.

No findings.


This review is advisory — it never blocks a merge and never auto-approves.

@brentvatne

Copy link
Copy Markdown
Member

@williamgrosset - can you add a screenshot of the output to the PR description? it's always good to see what it actually looks like when rendered in the terminal

@williamgrosset

Copy link
Copy Markdown
Contributor Author

@brentvatne Good call, I updated the indentation and line breaks so it matches our existing styles. I think it looks better now

Before

Screenshot 2026-08-05 at 4 02 54 PM

After

Screenshot 2026-08-05 at 4 07 53 PM

(similar to init error):
Screenshot 2026-08-05 at 4 21 29 PM

Copy link
Copy Markdown
Member

can we fix the duplicated "EAS project not configured" message?

@williamgrosset

Copy link
Copy Markdown
Contributor Author

Updated PR description:

Screenshot 2026-08-05 at 6 02 42 PM

@williamgrosset williamgrosset added ai-review Commits pushed to PRs with this label be automatically reviewed. and removed ai-review Commits pushed to PRs with this label be automatically reviewed. labels Aug 6, 2026
@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown

✅ Thank you for adding the changelog entry!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-review Commits pushed to PRs with this label be automatically reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants