Skip to content

Commit

Permalink
Merge pull request #81 from actions/elireisman/fix-default-case
Browse files Browse the repository at this point in the history
Fix default-case in error handling
  • Loading branch information
febuiles authored May 23, 2022
2 parents 0be8084 + f4b10ab commit a9c83d3
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
9 changes: 7 additions & 2 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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

Large diffs are not rendered by default.

8 changes: 6 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,12 @@ async function run(): Promise<void> {
core.setFailed(
`Dependency review is not supported on this repository. Please ensure that Dependency graph is enabled, see https://github.com/${github.context.repo.owner}/${github.context.repo.repo}/settings/security_analysis`
)
} else if (error instanceof Error) {
core.setFailed(error.message)
} else {
if (error instanceof Error) {
core.setFailed(error.message)
} else {
core.setFailed('Unexpected fatal error')
}
}
}
}
Expand Down

0 comments on commit a9c83d3

Please sign in to comment.