Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add configuration error for missing auth to package registry #2311

Merged
merged 1 commit into from
May 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading