Auto-detect non-interactive mode in CI / non-TTY environments#3486
Merged
douglowder merged 4 commits intomainfrom Mar 12, 2026
Merged
Auto-detect non-interactive mode in CI / non-TTY environments#3486douglowder merged 4 commits intomainfrom
douglowder merged 4 commits intomainfrom
Conversation
|
Subscribed to pull request
Generated by CodeMention |
b222341 to
610234a
Compare
Contributor
|
@EvanBacon I fixed merge conflicts, and found a change was needed in Jest setup to fix failing tests. |
e9c20c2 to
99d82a4
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3486 +/- ##
==========================================
+ Coverage 53.56% 53.58% +0.02%
==========================================
Files 815 815
Lines 34566 34572 +6
Branches 7175 7176 +1
==========================================
+ Hits 18513 18521 +8
+ Misses 15971 15969 -2
Partials 82 82 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
99d82a4 to
46a3757
Compare
brentvatne
approved these changes
Mar 12, 2026
| import { boolish } from 'getenv'; | ||
|
|
||
| export function isNonInteractiveByDefault(): boolean { | ||
| return boolish('CI', false) || !process.stdin.isTTY; |
Member
There was a problem hiding this comment.
should we use detectAgent()? https://www.npmjs.com/package/@vercel/detect-agent
Contributor
There was a problem hiding this comment.
That's a good suggestion for the future -- Claude also suggested taking a look at https://www.npmjs.com/package/ci-info for this check.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
46a3757 to
55b3248
Compare
|
✅ Thank you for adding the changelog entry! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
eas build -p androidprompts for keystore generation and fails in CI or non-TTY environments:Passing
--non-interactiveworks around this, but it should be auto-detected whenCI=1or stdin is not a TTY.How
Set a
defaultfunction on both--non-interactiveflag definitions (EasNonInteractiveAndJsonFlagsandEASNonInteractiveFlag) inpackages/eas-cli/src/commandUtils/flags.ts. The default checksCIenv var (viaboolishfromgetenv) andprocess.stdin.isTTY.defaultonly when the user does NOT pass--non-interactiveon CLInoCacheDefault: trueprevents baking the developer's environment intooclif.manifest.jsonTest Plan
isNonInteractiveByDefault()covering: TTY without CI (false), CI=1 (true), CI=true (true), non-TTY stdin (true), both CI and non-TTY (true)resolveNonInteractiveAndJsonFlagstests pass unchangedyarn typecheckpassesyarn lintpasses (0 errors)🤖 Generated with Claude Code