Improve experience when init fails before generating a config file

Suppose a customer has a run where the init Action failed before saving
a config file.
When the customer opens their Actions logs, the UI currently focuses on
the post init step, since this is the last step that failed.
Demoting the error in the post init Action to a warning means that the
UI will instead focus on the `init` step, which is more useful for
debugging what went wrong.
This commit is contained in:
Henry Mercer
2022-11-07 18:50:16 +00:00
parent 8aff97f12c
commit f9948ffd0e
3 changed files with 4 additions and 4 deletions

View File

@@ -13,8 +13,8 @@ export async function run(
const config = await getConfig(actionsUtil.getTemporaryDirectory(), logger);
if (config === undefined) {
throw new Error(
"Config file could not be found at expected location. Did the 'init' action fail to start?"
logger.warning(
"Debugging artifacts are unavailable since the 'init' Action failed before it could produce any."
);
}