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

Option to skip hash validation and error message improvements #2260

Merged
merged 7 commits into from
Jun 14, 2018

Conversation

r15ch13
Copy link
Member

@r15ch13 r15ch13 commented May 16, 2018

  • Add show_app() function for displaying app/bucket@version
  • Add option (-s | --skip) to skip hash validation on scoop install and scoop update to allow installation when a manifest provides an outdated hash
  • Add new_issue_msg() function for nicer error messages with a link to the buckets repository. clicking on the link opens a new issue with a predefined title
  • Show filename instead of unreadable robocopy output when file moving fails and use new_issue_msg()
  • Handle hash validation errors with new_issue_msg()

Hm, maybe I put too much in this pull-request ... one change leads to another. 🤷‍♂️ 😁

Example output:

λ .\bin\scoop.ps1 install wox
Installing 'wox' (1.3.524) [64bit]
Wox-1.3.524-full.nupkg (5,0 MB) [===========================] 100%
Checking hash of Wox-1.3.524-full.nupkg... ERROR Hash check failed!
App:       extras/wox
URL:       https://github.com/Wox-launcher/Wox/releases/download/v1.3.524/Wox-1.3.524-full.nupkg#/dl.7z
Expected:  bfb73e46c3c054c00c24ab0f03ed441ab1308e07
Actual:    9025a4d5264b9cf73cd48a2679b91f1127e46c10

Please create a new issue by using the following link and paste your console output:
https://github.com/lukesampson/scoop-extras/issues/new?title=wox%401.3.524%3a+hash+check+failed

Ultimate goal: Use GitHub Issue API to find reported hash check errors and let Excavator resolve them automagically.

Allows users to install an app when the manifest provides an outdated hash
- returns a message with a link to the buckets GitHub repository
- clicking on the link opens a new issues with a predefined title
- this removes the unreadable robocopy error dumps
@r15ch13 r15ch13 added the review-needed Asks for review of these changes label May 16, 2018
@@ -246,7 +246,7 @@ function movedir($from, $to) {

$out = robocopy "$from" "$to" /e /move
if($lastexitcode -ge 8) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps:

throw "Could not find '$(fname $from)'! (error $lastexitcode)"

?

Copy link
Member

@brandon93s brandon93s left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice, I'm a fan of the issue links when an error occurs. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
review-needed Asks for review of these changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants