diff --git a/CHANGELOG.md b/CHANGELOG.md index 71b972644f..a5c1066f38 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ This is the log of notable changes to EAS CLI and related packages. ### ๐ŸŽ‰ New features +- Print uncommitted files in non-interactive mode if they fail the execution. ([#2288](https://github.com/expo/eas-cli/pull/2288) by [@sjchmiela](https://github.com/sjchmiela)) + ### ๐Ÿ› Bug fixes ### ๐Ÿงน Chores diff --git a/packages/eas-cli/src/build/configure.ts b/packages/eas-cli/src/build/configure.ts index 22414a3939..10682ea829 100644 --- a/packages/eas-cli/src/build/configure.ts +++ b/packages/eas-cli/src/build/configure.ts @@ -40,7 +40,7 @@ async function configureAsync({ nonInteractive, vcsClient, }: ConfigureParams): Promise { - await maybeBailOnRepoStatusAsync(vcsClient); + await maybeBailOnRepoStatusAsync(vcsClient, nonInteractive); await createEasJsonAsync(projectDir, vcsClient); diff --git a/packages/eas-cli/src/build/utils/repository.ts b/packages/eas-cli/src/build/utils/repository.ts index 5c6874c4c4..929e2bb271 100644 --- a/packages/eas-cli/src/build/utils/repository.ts +++ b/packages/eas-cli/src/build/utils/repository.ts @@ -12,7 +12,10 @@ import { getTmpDirectory } from '../../utils/paths'; import { endTimer, formatMilliseconds, startTimer } from '../../utils/timer'; import { Client } from '../../vcs/vcs'; -export async function maybeBailOnRepoStatusAsync(vcsClient: Client): Promise { +export async function maybeBailOnRepoStatusAsync( + vcsClient: Client, + nonInteractive: boolean +): Promise { if (!(await vcsClient.isCommitRequiredAsync())) { return; } @@ -28,6 +31,11 @@ export async function maybeBailOnRepoStatusAsync(vcsClient: Client): Promise { + const gitStatusOutput = await gitStatusAsync({ showUntracked: true }); + Log.log(gitStatusOutput); + } + public override async hasUncommittedChangesAsync(): Promise { const changes = await gitStatusAsync({ showUntracked: true }); return changes.length > 0; diff --git a/packages/eas-cli/src/vcs/vcs.ts b/packages/eas-cli/src/vcs/vcs.ts index 72101c8050..189f777c7c 100644 --- a/packages/eas-cli/src/vcs/vcs.ts +++ b/packages/eas-cli/src/vcs/vcs.ts @@ -51,6 +51,9 @@ export abstract class Client { // `commitAsync({ commitAllFiles: false })` public async showDiffAsync(): Promise {} + /** (optional) print list of changed files */ + public async showChangedFilesAsync(): Promise {} + // (optional) returns hash of the last commit // used for metadata - implementation can be safely skipped public async getCommitHashAsync(): Promise {