Do not show a stacktrace if a process failed, only the message

* The stacktrace is confusing and rarely useful in that case.
This commit is contained in:
Benoit Daloze
2023-02-11 13:39:22 +01:00
parent 4d060a10e6
commit a26e1fb6b3
2 changed files with 10 additions and 2 deletions
+5 -1
View File
@@ -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)
}
}
}