improve error message when config is not found

This commit is contained in:
Robert Brignull 2020-08-28 09:43:25 +01:00
parent 37bac22443
commit 80e2c4fe4a
12 changed files with 39 additions and 19 deletions

View file

@ -33,6 +33,9 @@ async function run() {
return;
}
const config = await config_utils.getConfig(util.getRequiredEnvParam('RUNNER_TEMP'), logger);
if (config === undefined) {
throw new Error("Config file could not be found at expected location. Has the 'init' action been called?");
}
language = autobuild_1.determineAutobuildLanguage(config, logger);
if (language !== undefined) {
await autobuild_1.runAutobuild(language, config, logger);