Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: mark the action as failed on uncaught errors #18

Closed

Conversation

TheMrMilchmann
Copy link

@TheMrMilchmann TheMrMilchmann commented Dec 31, 2023

Currently, the action only logs errors during the configuration phase and for internal bugs but does not mark the step as failed. This change fixes this by failing the step if any error is thrown (and not caught elsewhere).

See this workflow run for example without this change and this run with the change.

@TheMrMilchmann TheMrMilchmann force-pushed the fix/fail-on-config-error branch 2 times, most recently from 3cbbb39 to 772ded0 Compare December 31, 2023 00:41
TheMrMilchmann added a commit to TheMrMilchmann/setup-msvc-dev that referenced this pull request Dec 31, 2023
TheMrMilchmann added a commit to TheMrMilchmann/setup-msvc-dev that referenced this pull request Dec 31, 2023
@TheMrMilchmann TheMrMilchmann marked this pull request as draft December 31, 2023 01:01
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).
@TheMrMilchmann TheMrMilchmann marked this pull request as ready for review December 31, 2023 02:34
@TheMrMilchmann TheMrMilchmann changed the title fix: mark the action as failed if errors fix: mark the action as failed on uncaught errors Dec 31, 2023
@TheMrMilchmann
Copy link
Author

To add some additional context on why this is important: When Dependabot opens a PR to update this action to v4, the checks might succeed, despite token not being configured. This can trick people into merging the PR and having essentially while this action silently fails.

@GeekyEggo
Copy link
Owner

Thanks for bringing this to my attention, @TheMrMilchmann. This should now be fixed in v4.1.0. I've also introduced a default value for token. If you experience any problems, please let me know.

@GeekyEggo GeekyEggo closed this Jan 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants