mirror of
https://github.com/hashicorp/vault-action.git
synced 2025-11-09 16:16:55 +00:00
Set output for the error message
In the event vault-action throws an error, the error message is sent to the workflow log when with core.setFailed, but that output is not accessible to other steps in the workflow. This change sets an output for the error message, called errorMessage, than can be read by other steps within the workflow and parsed.
This commit is contained in:
parent
3a9100e7d5
commit
2259b06d41
1 changed files with 1 additions and 0 deletions
|
|
@ -5,6 +5,7 @@ const { exportSecrets } = require('./action');
|
||||||
try {
|
try {
|
||||||
await core.group('Get Vault Secrets', exportSecrets);
|
await core.group('Get Vault Secrets', exportSecrets);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
core.setOutput("errorMessage", error.message);
|
||||||
core.setFailed(error.message);
|
core.setFailed(error.message);
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue