Skip to content

Commit

Permalink
fix: mark the action as failed on uncaught errors
Browse files Browse the repository at this point in the history
Currently, the action does only log errors during configuration phase and for internal bugs but does not actually mark the step as failed. This change fixes this by failing the step if any error is thrown (and not caught elsewhere).
  • Loading branch information
TheMrMilchmann committed Dec 31, 2023
1 parent 6b67656 commit f3d1f41
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29419,7 +29419,8 @@ const utils_1 = __nccwpck_require__(1314);
}
}
catch (err) {
core.error(`${err}`);
// @ts-ignore
core.setFailed(err);
}
});
})();
Expand Down
3 changes: 2 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import { fail } from "./utils";
);
}
} catch (err) {
core.error(`${err}`);
// @ts-ignore
core.setFailed(err);
}
})();

0 comments on commit f3d1f41

Please sign in to comment.