Skip to content

Commit 9550da9

Browse files
authored
Merge pull request #2311 from github/henrymercer/pack-missing-auth-config-error
Add configuration error for missing auth to package registry
2 parents 7927df0 + 6548a4d commit 9550da9

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

lib/cli-errors.js

+7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/cli-errors.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/cli-errors.ts

+9
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ export enum CliConfigErrorCategory {
135135
NoSupportedBuildSystemDetected = "NoSupportedBuildSystemDetected",
136136
OutOfMemoryOrDisk = "OutOfMemoryOrDisk",
137137
PackCannotBeFound = "PackCannotBeFound",
138+
PackMissingAuth = "PackMissingAuth",
138139
SwiftBuildFailed = "SwiftBuildFailed",
139140
UnsupportedBuildMode = "UnsupportedBuildMode",
140141
}
@@ -244,6 +245,14 @@ export const cliErrorsConfig: Record<
244245
),
245246
],
246247
},
248+
[CliConfigErrorCategory.PackMissingAuth]: {
249+
cliErrorMessageCandidates: [
250+
new RegExp("GitHub Container registry .* 403 Forbidden"),
251+
new RegExp(
252+
"Do you need to specify a token to authenticate to the registry?",
253+
),
254+
],
255+
},
247256
[CliConfigErrorCategory.SwiftBuildFailed]: {
248257
cliErrorMessageCandidates: [
249258
new RegExp(

0 commit comments

Comments
 (0)