Skip to content

Commit

Permalink
Move config error processing for database init
Browse files Browse the repository at this point in the history
As we add more configuration errors, we can standardize throwing and catching them in the `codeql` file where we actually invoke the commands.

Also, rename to `isCliConfigurationError` for more clarity.
  • Loading branch information
angelapwen committed Jan 30, 2024
1 parent d678f61 commit 7837cc7
Show file tree
Hide file tree
Showing 9 changed files with 95 additions and 124 deletions.
6 changes: 3 additions & 3 deletions lib/cli-config-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-config-errors.js.map

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

36 changes: 25 additions & 11 deletions lib/codeql.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/codeql.js.map

Large diffs are not rendered by default.

43 changes: 7 additions & 36 deletions lib/init.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/init.js.map

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

2 changes: 1 addition & 1 deletion src/cli-config-errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export const cliErrorsConfig: Record<
* error: if there is an exit code, this takes precedence. Otherwise, matches
* the error message against the expected message snippets.
*/
export function isConfigurationError(
export function isCliConfigurationError(
cliError: CliError,
cliErrorMessage: string,
exitCode?: number,
Expand Down
Loading

0 comments on commit 7837cc7

Please sign in to comment.