Skip to content

Commit f9948ff

Browse files
committed
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.
1 parent 8aff97f commit f9948ff

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

lib/init-action-post-helper.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/init-action-post-helper.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/init-action-post-helper.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ export async function run(
1313

1414
const config = await getConfig(actionsUtil.getTemporaryDirectory(), logger);
1515
if (config === undefined) {
16-
throw new Error(
17-
"Config file could not be found at expected location. Did the 'init' action fail to start?"
16+
logger.warning(
17+
"Debugging artifacts are unavailable since the 'init' Action failed before it could produce any."
1818
);
1919
}
2020

0 commit comments

Comments
 (0)