Skip to content

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

Merged
rashil2000 merged 1 commit intoScoopInstaller:developfrom
CrendKing:checkver_throw_error
Apr 14, 2022
Merged

feat(checkver): Add option to throw error as exception#4867
rashil2000 merged 1 commit intoScoopInstaller:developfrom
CrendKing:checkver_throw_error

Conversation

@CrendKing
Copy link
Copy Markdown
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
Copy Markdown
Member

rashil2000 commented Apr 13, 2022

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

@CrendKing
Copy link
Copy Markdown
Contributor Author

Done. Any objection for the variable names?

@rashil2000
Copy link
Copy Markdown
Member

LGTM

@rashil2000 rashil2000 requested a review from issaclin32 April 14, 2022 12:48
@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