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

@ -32,6 +32,9 @@ async function run() {
}
const logger = getActionsLogger();
const config = await 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?");
}
stats = await runAnalyze(
parseRepositoryNwo(util.getRequiredEnvParam('GITHUB_REPOSITORY')),
await util.getCommitOid(),