improve error message when config is not found
This commit is contained in:
parent
37bac22443
commit
80e2c4fe4a
12 changed files with 39 additions and 19 deletions
3
lib/analyze-action.js
generated
3
lib/analyze-action.js
generated
|
|
@ -33,6 +33,9 @@ async function run() {
|
|||
}
|
||||
const logger = logging_1.getActionsLogger();
|
||||
const config = await config_utils_1.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 analyze_1.runAnalyze(repository_1.parseRepositoryNwo(util.getRequiredEnvParam('GITHUB_REPOSITORY')), await util.getCommitOid(), util.getRef(), await util.getAnalysisKey(), util.getRequiredEnvParam('GITHUB_WORKFLOW'), util.getWorkflowRunID(), core.getInput('checkout_path'), core.getInput('matrix'), core.getInput('token'), util.getRequiredEnvParam('GITHUB_SERVER_URL'), core.getInput('upload') === 'true', 'actions', core.getInput('output'), config, logger);
|
||||
}
|
||||
catch (error) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue