Fix non-interactive mode prompting for git initialization#3387
Fix non-interactive mode prompting for git initialization#3387
Conversation
Add an optional nonInteractive parameter to Client.ensureRepoExistsAsync and implement it in GitClient. When nonInteractive is true, GitClient will auto-init the repo (git init), create an initial commit, and surface a single error with suggested git config commands if user.name/email are missing. Update callers across build/update/inspect/configure commands to pass the appropriate nonInteractive flag and adjust ensureRepoIsCleanAsync calls. Also resolve the workspace root for init operations and improve related log messages.
|
Subscribed to pull request
Generated by CodeMention |
|
Size Change: -1.67 kB (0%) Total Size: 72.7 MB
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #3387 +/- ##
==========================================
- Coverage 52.31% 52.29% -0.01%
==========================================
Files 804 804
Lines 33425 33437 +12
Branches 6975 6981 +6
==========================================
Hits 17482 17482
- Misses 14555 14566 +11
- Partials 1388 1389 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
douglowder
left a comment
There was a problem hiding this comment.
In non-interactive mode, we should definitely not prompt. Thanks for fixing that! However, we should not execute a git operation under the hood. I'd prefer that we throw an error stating that the command requires a git repo.
|
@douglowder my thinking here is that git is pretty easy to delete and users can opt-out of this behavior by: a) having a git repo, or b) setting |
|
✅ Thank you for adding the changelog entry! |
Summary
eas build --non-interactiveprompting interactively when the project doesn't have git initializedgit initand creates an initial commitNo git repository found. Auto initializing in /path. Set EAS_NO_VCS=1 to skip.Test plan
eas build --non-interactivein a project without git initializedEAS_NO_VCS=1 eas build --non-interactiveskips git initialization🤖 Generated with Claude Code