Skip to content

[eas-cli] metadata:pull: print --non-interactive hint before overwrite prompt#3693

Open
Maples7 wants to merge 1 commit into
expo:mainfrom
Maples7:enhance/metadata-pull-overwrite-hint
Open

[eas-cli] metadata:pull: print --non-interactive hint before overwrite prompt#3693
Maples7 wants to merge 1 commit into
expo:mainfrom
Maples7:enhance/metadata-pull-overwrite-hint

Conversation

@Maples7
Copy link
Copy Markdown

@Maples7 Maples7 commented May 8, 2026

Why

The overwrite confirmation in eas metadata:pull is unanswerable in a number of common environments and indistinguishable from a hang:

  • Inside an AI-agent integrated terminal (Copilot Chat, etc.) that wraps the shell in a pty: process.stdin.isTTY === true, so EASNonInteractiveFlag's autodetect doesn't trigger, and there is no human to type y.
  • When stdout is piped (eas metadata:pull | tee log): the prompt is often hidden behind the spinner/pipe.
  • Inside nohup without < /dev/null.

The fix in #3691 is split into three suggestions; this PR ships the smallest one (suggestion 2) — print an explicit hint immediately before the confirm — because it's a pure log addition with no behavioral change to the default flag autodetect. The other two suggestions in the issue (auto-non-interactive when !process.stdout.isTTY, default-overwrite for matching appId) are larger UX/behavior changes and are best discussed in the issue thread before being merged.

Refs #3691. Closes #3691.

How

Add one Log.log(chalk.dim('Tip: pass --non-interactive to auto-overwrite ... without prompting.')) line in downloadMetadataAsync immediately before confirmAsync. Stays inside the else branch so it does not print under --non-interactive. Uses chalk.dim to match the muted style of other hint lines in the codebase.

Test Plan

Added two unit tests in packages/eas-cli/src/metadata/__tests__/download.test.ts:

$ yarn test src/metadata/__tests__/download.test.ts
PASS src/metadata/__tests__/download.test.ts
  downloadMetadataAsync
    ✓ skips overwrite prompt and auto-overwrites in non-interactive mode
    ✓ prompts for overwrite in interactive mode when file exists
    ✓ prints a --non-interactive hint before the overwrite prompt so a stuck invocation is self-explanatory
    ✓ does not print the --non-interactive hint when running in non-interactive mode
    ✓ throws MetadataValidationError when user declines overwrite in interactive mode
    ✓ does not prompt when file does not exist
Test Suites: 1 passed, 1 total
Tests:       6 passed, 6 total

Full metadata suite still passes (yarn test src/metadata → 15 suites, 189 tests, 187 baseline + 2 new). yarn typecheck clean. yarn lint clean (0 errors; pre-existing warning count unchanged).

Manual smoke test (against my own ASC project):

$ eas metadata:pull --profile production
✔ Linked to project @<owner>/<project>
EAS Metadata is in beta and subject to breaking changes.
Tip: pass --non-interactive to auto-overwrite "store.config.json" without prompting.
✔ Do you want to overwrite the existing "store.config.json"? … yes
Downloading App Store config...
🎉 Your store config is ready.

/changelog-entry chore [eas-cli] Print a --non-interactive hint before the metadata:pull overwrite prompt so stuck invocations under piped stdout / agent terminals are self-explanatory.

…e prompt

The overwrite confirmation in metadata:pull is invisible-by-default when stdout
is piped (e.g. `eas metadata:pull | tee log`) and unanswerable when running
inside an integrated terminal that does not surface stdin (CI pseudo-tty,
AI-agent terminal wrappers). The current behavior is indistinguishable from a
hang. Print an explicit dim hint immediately before confirmAsync so a stuck
invocation is self-explanatory.

Refs expo#3691
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 8, 2026

Subscribed to pull request

File Patterns Mentions
**/* @douglowder
packages/eas-cli/src/metadata/** @byCedric

Generated by CodeMention

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.

metadata:pull: detect non-interactive stdout (or print a clearer hint) when prompting to overwrite store.config.json

1 participant