Skip to content

Commit 7837cc7

Browse files
committed
Move config error processing for database init
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.
1 parent d678f61 commit 7837cc7

9 files changed

Lines changed: 95 additions & 124 deletions

File tree

lib/cli-config-errors.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/cli-config-errors.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/codeql.js

Lines changed: 25 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/codeql.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/init.js

Lines changed: 7 additions & 36 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/init.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/cli-config-errors.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export const cliErrorsConfig: Record<
5151
* error: if there is an exit code, this takes precedence. Otherwise, matches
5252
* the error message against the expected message snippets.
5353
*/
54-
export function isConfigurationError(
54+
export function isCliConfigurationError(
5555
cliError: CliError,
5656
cliErrorMessage: string,
5757
exitCode?: number,

0 commit comments

Comments
 (0)