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

feat(checkver): Add option to throw error as exception #4867

Merged
merged 1 commit into from
Apr 14, 2022
Merged

feat(checkver): Add option to throw error as exception #4867

merged 1 commit into from
Apr 14, 2022

Conversation

CrendKing
Copy link
Contributor

Description

Motivation and Context

Closes #4863

This is the core part of the change. The GitHub Action part is at ScoopInstaller/GithubActions#5.

How Has This Been Tested?

I created a Scoop bucket repo with some manifests in it. One manifest is intentionally old and requires update.

  1. Make the manifest's autoupdate url wrong so it can't complete the autoupdate process.
  2. Run the excavator workflow, observe the run completes successfully, though there is error message in the log (the option is disabled as default).
  3. Add THROW_ERROR option to excavator.yml, make it '0'. Rerun the workflow. Observe the exact same result (because option is disabled as default).
  4. Change THROW_ERROR to '1'. Rerun the workflow. Observe the run is now failed and GitHub sends notification to me. The log shows an error is thrown.

Checklist:

  • I have read the Contributing Guide.
  • I have updated the documentation accordingly.
  • I have updated the tests accordingly.

@rashil2000
Copy link
Member

rashil2000 commented Apr 13, 2022

  • Line 170 also needs a -ThrowError:$ThrowError
  • Update changelog

@CrendKing
Copy link
Contributor Author

Done. Any objection for the variable names?

@rashil2000
Copy link
Member

LGTM

@rashil2000 rashil2000 merged commit 47c0f46 into ScoopInstaller:develop Apr 14, 2022
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.

3 participants