Skip to content

Commit

Permalink
Merge pull request #2311 from github/henrymercer/pack-missing-auth-co…
Browse files Browse the repository at this point in the history
…nfig-error

Add configuration error for missing auth to package registry
  • Loading branch information
henrymercer authored May 28, 2024
2 parents 7927df0 + 6548a4d commit 9550da9
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
7 changes: 7 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.

9 changes: 9 additions & 0 deletions src/cli-errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ export enum CliConfigErrorCategory {
NoSupportedBuildSystemDetected = "NoSupportedBuildSystemDetected",
OutOfMemoryOrDisk = "OutOfMemoryOrDisk",
PackCannotBeFound = "PackCannotBeFound",
PackMissingAuth = "PackMissingAuth",
SwiftBuildFailed = "SwiftBuildFailed",
UnsupportedBuildMode = "UnsupportedBuildMode",
}
Expand Down Expand Up @@ -244,6 +245,14 @@ export const cliErrorsConfig: Record<
),
],
},
[CliConfigErrorCategory.PackMissingAuth]: {
cliErrorMessageCandidates: [
new RegExp("GitHub Container registry .* 403 Forbidden"),
new RegExp(
"Do you need to specify a token to authenticate to the registry?",
),
],
},
[CliConfigErrorCategory.SwiftBuildFailed]: {
cliErrorMessageCandidates: [
new RegExp(
Expand Down

0 comments on commit 9550da9

Please sign in to comment.