Skip to content

Commit

Permalink
fix: update error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
prototypicalpro committed Aug 13, 2020
1 parent 83b1b26 commit 39f88dc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,11 @@ export default async function run(disableRetry?: boolean): Promise<void> {
jsonFormatter.formatOutput(result, true)
)
} catch (error) {
core.error('A fatal error was thrown.')
// set the outputs for this action
core.setOutput(Outputs.ERRORED, true)
core.setOutput(Outputs.PASSED, false)
core.setFailed(error.message)
core.setFailed('A fatal error was thrown.')
core.error(error as Error)
if (error.stack) core.error(error.stack)
}
}

0 comments on commit 39f88dc

Please sign in to comment.