Skip to content

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

Merged
williamgrosset merged 5 commits into
mainfrom
williamgrosset/improve-unlinked-project-error
Aug 11, 2026
Merged

[eas-cli] Improve non-interactive error for unconfigured projects#4153
williamgrosset merged 5 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 63.28%. Comparing base (221e015) to head (68c1fae).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4153      +/-   ##
==========================================
+ Coverage   63.27%   63.28%   +0.01%     
==========================================
  Files        1023     1024       +1     
  Lines       46690    46699       +9     
  Branches     9844     9848       +4     
==========================================
+ Hits        29538    29547       +9     
  Misses      15698    15698              
  Partials     1454     1454              

☔ 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 at two "EAS project not configured" throw sites on the shared project-ID resolution path, and it stops a related log warning in non-interactive mode. The affected surface is small and bounded to error and warning text; no credential or secret value is added to the output. The most plausible risk is that CI scripts or docs matching the old error strings stop matching, but the reviewers found no remaining source or test reference to the old strings, and the related tests were updated. No correctness, security, or consistency findings were raised by any reviewer.

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

Copy link
Copy Markdown

✅ Thank you for adding the changelog entry!

@williamgrosset
williamgrosset merged commit 520c63f into main Aug 11, 2026
11 checks passed
@williamgrosset
williamgrosset deleted the williamgrosset/improve-unlinked-project-error branch August 11, 2026 17:55
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