fix: action failure status
This commit is contained in:
parent
de65f3e128
commit
63d1ce5ec8
2 changed files with 22 additions and 22 deletions
|
|
@ -1,3 +1,8 @@
|
|||
import * as core from '@actions/core';
|
||||
import * as main from './main';
|
||||
|
||||
try {
|
||||
main.run();
|
||||
} catch (e) {
|
||||
core.setFailed(`Action failed with error ${e}`);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,7 +34,6 @@ export async function showVersion(
|
|||
}
|
||||
|
||||
export async function run(): Promise<ActionResult> {
|
||||
try {
|
||||
const toolVersion: string = core.getInput('hugo-version');
|
||||
let installVersion = '';
|
||||
|
||||
|
|
@ -54,8 +53,4 @@ export async function run(): Promise<ActionResult> {
|
|||
result = await showVersion(Tool.CmdName, [Tool.CmdOptVersion]);
|
||||
|
||||
return result;
|
||||
} catch (e) {
|
||||
core.setFailed(`Action failed with error ${e}`);
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue