Skip to content

Commit

Permalink
Fix usage of any
Browse files Browse the repository at this point in the history
  • Loading branch information
e1himself committed Dec 22, 2023
1 parent 47f2a82 commit 9aec67b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,9 @@ async function run(): Promise<void> {
await chmod(downloaded, '755')
const cached = await cache(downloaded, version)
addPaths(cached)
} catch (error: any) {
core.setFailed(error?.message || ERROR_MESSAGE)
} catch (error) {
const message = error instanceof Error ? error.message : undefined
core.setFailed(message || ERROR_MESSAGE)
}
}

Expand Down

0 comments on commit 9aec67b

Please sign in to comment.