Turn info messages into warnings

This commit is contained in:
Luc Perkins 2024-06-03 15:32:32 -07:00
parent 7afbb0a392
commit b2e770e214
No known key found for this signature in database
GPG key ID: 16DB1108FB591835
3 changed files with 19 additions and 9 deletions

13
dist/index.js generated vendored
View file

@ -95697,10 +95697,15 @@ var MagicNixCacheAction = class extends DetSysAction {
} }
core.debug(`back from post: ${res.body}`); core.debug(`back from post: ${res.body}`);
} catch (e) { } catch (e) {
core.info(`Error marking the workflow as started:`); if (this.strictMode) {
core.info((0,external_node_util_.inspect)(e)); core.setFailed(`Magic Nix Cache failed to start: ${(0,external_node_util_.inspect)(e)}`);
core.info(`Magic Nix Cache may not be running for this workflow.`); } else {
this.failOnError(`Magic Nix Cache failed to start: ${(0,external_node_util_.inspect)(e)}`); core.warning(`Error marking the workflow as started:`);
core.warning((0,external_node_util_.inspect)(e));
core.warning(
`Magic Nix Cache may not be running for this workflow.`
);
}
} }
} }
async tearDownAutoCache() { async tearDownAutoCache() {

2
dist/index.js.map generated vendored

File diff suppressed because one or more lines are too long

View file

@ -312,10 +312,15 @@ class MagicNixCacheAction extends DetSysAction {
actionsCore.debug(`back from post: ${res.body}`); actionsCore.debug(`back from post: ${res.body}`);
} catch (e: unknown) { } catch (e: unknown) {
actionsCore.info(`Error marking the workflow as started:`); if (this.strictMode) {
actionsCore.info(inspect(e)); actionsCore.setFailed(`Magic Nix Cache failed to start: ${inspect(e)}`);
actionsCore.info(`Magic Nix Cache may not be running for this workflow.`); } else {
this.failOnError(`Magic Nix Cache failed to start: ${inspect(e)}`); actionsCore.warning(`Error marking the workflow as started:`);
actionsCore.warning(inspect(e));
actionsCore.warning(
`Magic Nix Cache may not be running for this workflow.`,
);
}
} }
} }