Skip to content

Commit

Permalink
Add user error for "Pack cannot be found"
Browse files Browse the repository at this point in the history
  • Loading branch information
henrymercer committed May 8, 2024
1 parent 4b812a5 commit ec11790
Show file tree
Hide file tree
Showing 3 changed files with 15 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.

8 changes: 8 additions & 0 deletions src/cli-errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ export enum CliConfigErrorCategory {
NoSourceCodeSeen = "NoSourceCodeSeen",
NoSupportedBuildCommandSucceeded = "NoSupportedBuildCommandSucceeded",
NoSupportedBuildSystemDetected = "NoSupportedBuildSystemDetected",
PackCannotBeFound = "PackCannotBeFound",
SwiftBuildFailed = "SwiftBuildFailed",
UnsupportedBuildMode = "UnsupportedBuildMode",
}
Expand Down Expand Up @@ -220,6 +221,13 @@ export const cliErrorsConfig: Record<
new RegExp("No supported build system detected"),
],
},
[CliConfigErrorCategory.PackCannotBeFound]: {
cliErrorMessageCandidates: [
new RegExp(
"Query pack .* cannot be found\\. Check the spelling of the pack\\.",
),
],
},
[CliConfigErrorCategory.SwiftBuildFailed]: {
cliErrorMessageCandidates: [
new RegExp(
Expand Down

0 comments on commit ec11790

Please sign in to comment.