Skip to content

Commit a9c83d3

Browse files
author
Federico Builes
authored
Merge pull request #81 from actions/elireisman/fix-default-case
Fix default-case in error handling
2 parents 0be8084 + f4b10ab commit a9c83d3

File tree

3 files changed

+14
-5
lines changed

3 files changed

+14
-5
lines changed

dist/index.js

Lines changed: 7 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,12 @@ async function run(): Promise<void> {
6060
core.setFailed(
6161
`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`
6262
)
63-
} else if (error instanceof Error) {
64-
core.setFailed(error.message)
63+
} else {
64+
if (error instanceof Error) {
65+
core.setFailed(error.message)
66+
} else {
67+
core.setFailed('Unexpected fatal error')
68+
}
6569
}
6670
}
6771
}

0 commit comments

Comments
 (0)