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(download): Allow downloading without installing #4621

Merged
merged 4 commits into from
Jan 8, 2022
Merged

Conversation

rashil2000
Copy link
Member

@rashil2000 rashil2000 commented Jan 5, 2022

Description

Useful for:

  • Users: to pre-populate the cache:
    • in case they need to install something later (i.e. no internet scenario)
    • in case they want to inspect the installer/archive for an application (without installing)
  • Maintainers: to manually verify:
    • hash check failures
    • 404 errors (e.g. with aria2, sourceforge etc.)

The second scenario is perhaps the most useful personally because many people open issues about download failures, but I don't really want to install the particular app. So I can just do scoop download <app> to rectify the issue.

Motivation and Context

Closes #1804

Relates to #2293

How Has This Been Tested?

  1. Simple test:
    image

  2. Above test with pre-filled cache:
    image

  3. Test 1 with 32bit download:
    image

  4. Test 3 with skipping hash check:
    image

  5. Test 4 with force download (overwrite cache):
    image

  6. Test with one app with unsupported architecture:
    image

  7. Test 6 with aria2:
    image

  8. Test with pre-cached install:
    image

Checklist:

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

@rashil2000
Copy link
Member Author

Example: ScoopInstaller/Extras#7679

@niheaven
Copy link
Member

niheaven commented Jan 6, 2022

Pretty job!

But bin\checkurls.ps1 and bin\checkhashes.ps1 are existed helper bins that work for these situation, so why not modify checkhashes? Since checkhashes will download the file into cache folder with version HASH_CHECK likes: cpu-z#HASH_CHECK#https_download.cpuid.com_cpu-z_cpu-z_1.99-en.zip, add a switch to let checkhashes correctly rename versioned cache may be useful.

BTW, bin\checkhashes.ps1 is not ported to bucket repos now, it needs to be added.

@rashil2000
Copy link
Member Author

rashil2000 commented Jan 6, 2022

But we cannot use checkhashes as a sub-command of scoop, right?

I wanted to make this utility for both users and maintainers. Users might not be able to/comfortable in running a specific utility, only maintainers can.

@niheaven
Copy link
Member

niheaven commented Jan 8, 2022

Why not separate these two features into two PR? scoop-download is here, while --no-update-scoop in another?

@rashil2000
Copy link
Member Author

The new flag change was quite small and related to downloading itself, so I put it here.

I can make a new PR if you really insist.

@niheaven
Copy link
Member

niheaven commented Jan 8, 2022

Yes, I think changes in scoop-install and scoop-vitustotal should be separated, that will make changing more clear, right?

@rashil2000
Copy link
Member Author

Sure, will do

@rashil2000
Copy link
Member Author

Created #4634

Copy link
Member

@niheaven niheaven left a comment

Choose a reason for hiding this comment

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

The short params -h and -u seem to be confused, but I cannot figure out what will be better...

@rashil2000
Copy link
Member Author

The short params -h and -u seem to be confused, but I cannot figure out what will be better...

Haha yeah, we'll update it if we find more suitable short forms

@rashil2000 rashil2000 merged commit 9142703 into develop Jan 8, 2022
@rashil2000 rashil2000 deleted the dl-command branch January 8, 2022 10:29
se35710 pushed a commit to se35710/scoop that referenced this pull request Mar 8, 2022
…4621)

* feat(download): Allow downloading without installing

* update changelog

* rename 'skip' -> 'no-hash-check'

* add --no-update-scoop flag
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.

2 participants