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

[Bug] scoop download succeeds even when no free space #4810

Closed
tech189 opened this issue Mar 15, 2022 · 4 comments · Fixed by #4896
Closed

[Bug] scoop download succeeds even when no free space #4810

tech189 opened this issue Mar 15, 2022 · 4 comments · Fixed by #4896
Labels

Comments

@tech189
Copy link
Member

tech189 commented Mar 15, 2022

Bug Report

Scoop reports that download was successful when it fails due to lack of free space.

Current Behavior

When nearly out of free space on disk and running scoop download to get a file, once all free space is used, Scoop stops downloading and says both that it failed to download and that it succeeded.

Expected Behavior

If the download fails midway it should fail. No green text should appear.

Additional context/output

❯ scoop download testing/coq -a 32bit
INFO  Starting download for coq...
Coq-Platform-8.14.2022.01-installer-windows-i686_signed.exe (318.5 MB) [=========>  ]  84%
There is not enough space on the disk. : 'C:\Users\me\scoop\cache\coq#2022.01.0#https_github.com_coq_platform_releases_download_2022.01.0_Coq-Platform-8.14.2022.01-installer-windows-i686_signed.exe_dl.7z.download'
ERROR URL https://github.com/coq/platform/releases/download/2022.01.0/Coq-Platform-8.14.2022.01-installer-windows-i686_signed.exe#/dl.7z is not valid
'coq' (2022.01.0) was downloaded successfully!         <-- in green

Possible Solution

I'd love to try making a PR but have no idea where to start or how to test!

System details

Windows version: 11

OS architecture: 64bit

PowerShell version: 7.2.1

Additional software: none relevant

Scoop Configuration

   1   │ {
   2   │   "SCOOP_BRANCH": "master",
   3   │   "lastupdate": "2022-03-14T23:16:07.9419731+00:00",
   4   │   "SCOOP_REPO": "https://github.com/lukesampson/scoop",
   5   │   "debug": false,
   6   │   "aria2-enabled": false,
   7   │   "aria2-retry-wait": 4,
   8   │   "aria2-split": 16,
   9   │   "aria2-max-connection-per-server": 16,
  10   │   "aria2-min-split-size": "4M",
  11   │   "alias": {
  12   │     "reinstall": "scoop-reinstall"
  13   │   }
  14   │ }
@tech189 tech189 added the bug label Mar 15, 2022
@rashil2000
Copy link
Member

This is the place to go:

success "'$app' ($version) was downloaded successfully!"

Ideally, we should check for the exit status of download functions used above (dl_with_cache or dl_with_cache_aria2), and then print the green line.

@tech189
Copy link
Member Author

tech189 commented Mar 17, 2022

Thanks, got a fix for the standard download (dl_with_cache). Now I just need to debug why scoop-download doesn't use aria2 even when it's enabled...

@rashil2000
Copy link
Member

image

@tech189
Copy link
Member Author

tech189 commented Mar 17, 2022

❯ scoop config aria2-enabled
True

~
❯ scoop download protobuf   
INFO  Starting download for protobuf...
protoc-3.19.4-win64.zip (1.5 MB) [==================================================================================================================] 100%
Checking hash of protoc-3.19.4-win64.zip ... ok.
'protobuf' (3.19.4) was downloaded successfully!

Just realised why! Scoop won't warn you that aria2 isn't installed, it just uses the normal download instead 😆

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants