Make "init not called" a configuration error

This commit is contained in:
Henry Mercer
2025-08-20 14:55:28 +01:00
parent 6dee5bc9c1
commit e496ff9593
9 changed files with 11 additions and 9 deletions

View File

@@ -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?",
);
}

View File

@@ -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?",
);
}

View File

@@ -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?",
);
}