Skip to content

Commit

Permalink
Do not show a stacktrace if a process failed, only the message
Browse files Browse the repository at this point in the history
* The stacktrace is confusing and rarely useful in that case.
  • Loading branch information
eregon committed Feb 11, 2023
1 parent 4d060a1 commit a26e1fb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion dist/index.js

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

6 changes: 5 additions & 1 deletion index.js
Expand Up @@ -23,7 +23,11 @@ export async function run() {
try {
await setupRuby()
} catch (error) {
core.setFailed(error.stack)
if (/\bprocess\b.+\bfailed\b/.test(error.message)) {
core.setFailed(error.message)
} else {
core.setFailed(error.stack)
}
}
}

Expand Down

0 comments on commit a26e1fb

Please sign in to comment.