mirror of
https://github.com/github/codeql-action.git
synced 2026-01-05 14:10:11 +08:00
Make "init not called" a configuration error
This commit is contained in:
@@ -225,7 +225,7 @@ async function run() {
|
||||
|
||||
config = await getConfig(actionsUtil.getTemporaryDirectory(), logger);
|
||||
if (config === undefined) {
|
||||
throw new Error(
|
||||
throw new util.ConfigurationError(
|
||||
"Config file could not be found at expected location. Has the 'init' action been called?",
|
||||
);
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@ import {
|
||||
checkActionVersion,
|
||||
checkDiskUsage,
|
||||
checkGitHubVersionInRange,
|
||||
ConfigurationError,
|
||||
getErrorMessage,
|
||||
initializeEnvironment,
|
||||
wrapError,
|
||||
@@ -92,7 +93,7 @@ async function run() {
|
||||
|
||||
config = await getConfig(getTemporaryDirectory(), logger);
|
||||
if (config === undefined) {
|
||||
throw new Error(
|
||||
throw new ConfigurationError(
|
||||
"Config file could not be found at expected location. Has the 'init' action been called?",
|
||||
);
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@ import {
|
||||
checkDiskUsage,
|
||||
checkForTimeout,
|
||||
checkGitHubVersionInRange,
|
||||
ConfigurationError,
|
||||
getErrorMessage,
|
||||
wrapError,
|
||||
} from "./util";
|
||||
@@ -53,7 +54,7 @@ async function run() {
|
||||
|
||||
config = await getConfig(getTemporaryDirectory(), logger);
|
||||
if (config === undefined) {
|
||||
throw new Error(
|
||||
throw new ConfigurationError(
|
||||
"Config file could not be found at expected location. Has the 'init' action been called?",
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user