Skip to content

Commit

Permalink
Merge pull request #18 from jaxxstorm/catch_update
Browse files Browse the repository at this point in the history
  • Loading branch information
jaxxstorm committed Apr 20, 2022
2 parents 5f8957d + e6d6cd2 commit 6ae45b9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
8 changes: 7 additions & 1 deletion lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,13 @@ function run() {
core.addPath(extractedPath);
}
catch (error) {
core.setFailed(error.message);
let errorMessage = "Failed to download and extract release";
if (error instanceof Error) {
core.setFailed(error.message);
}
else {
core.setFailed("catastrophic failure, please file an issue");
}
}
});
}
Expand Down
7 changes: 6 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,12 @@ async function run() {

core.addPath(extractedPath);
} catch (error) {
core.setFailed(error.message);
let errorMessage = "Failed to download and extract release";
if (error instanceof Error) {
core.setFailed(error.message);
} else {
core.setFailed("catastrophic failure, please file an issue")
}
}
}

Expand Down

0 comments on commit 6ae45b9

Please sign in to comment.