Skip to content

Commit

Permalink
Add configuration error for failing to clone external Git repo
Browse files Browse the repository at this point in the history
  • Loading branch information
henrymercer committed Apr 19, 2024
1 parent 82edfe2 commit 1be8c48
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
6 changes: 6 additions & 0 deletions lib/cli-errors.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/cli-errors.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions src/cli-errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ function ensureEndsInPeriod(text: string): string {

/** Error messages from the CLI that we consider configuration errors and handle specially. */
export enum CliConfigErrorCategory {
ExternalRepositoryCloneFailed = "ExternalRepositoryCloneFailed",
GradleBuildFailed = "GradleBuildFailed",
IncompatibleWithActionVersion = "IncompatibleWithActionVersion",
InitCalledTwice = "InitCalledTwice",
Expand Down Expand Up @@ -150,6 +151,11 @@ export const cliErrorsConfig: Record<
CliConfigErrorCategory,
CliErrorConfiguration
> = {
[CliConfigErrorCategory.ExternalRepositoryCloneFailed]: {
cliErrorMessageCandidates: [
new RegExp("Failed to clone external Git repository"),
],
},
[CliConfigErrorCategory.GradleBuildFailed]: {
cliErrorMessageCandidates: [
new RegExp("[autobuild] FAILURE: Build failed with an exception."),
Expand Down

0 comments on commit 1be8c48

Please sign in to comment.