-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Feature request - Show possible download size in status
command
#2381
Comments
There is |
Still, knowing how large a download is before doing it would be very helpful. Even apt-get tells you how much the install will take. Those of us on metered connections need to know how much data we will be consuming. |
Oh, yeah. Calculating and showing the file size before confirming download would be a good feature. Don't know if we could get the file size of the package before triggering download. cc @r15ch13 I assume your request similar to below concept: $ scoop list
# show installed apps, blablabla....
$ scoop status
# show updates available, blablabla...
$ scoop update *
Reading package lists... Done
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
7zip, git, openssh
Need to get around 48.5 MB of archives.
Do you want to continue? [Y/n] n
$ scoop update git
Reading package lists... Done
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
git
Need to get around 39.2 MB of archives.
Do you want to continue? [Y/n] n
$ scoop update git -y
# Trigger upgrade! blablabla |
@h404bi yeah, it may be possible, but this also requires a complete rewrite of |
well the bucket could have the file size added to it. During creation of the bucket, get the installer size from explorer, and add a field. This way the file size would be pre-known. |
For http URLs, a HEAD request will often return the file size. |
status
command
In Scoop version 0.2.3, there is now a section in
I understand this is only a partial fix to this issue, but hopefully it will still be helpful! |
Get-ChildItem : Cannot find path 'C:\Users\CHerSun\far' because it does not exist.
At C:\Users\CHerSun\scoop\apps\scoop\current\libexec\scoop-info.ps1:115 char:25
+ ... rentFiles = Get-ChildItem $appFiles -Filter (Select-CurrentVersion $a ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (C:\Users\CHerSun\far:String) [Get-ChildItem], ItemNotFoundException
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetChildItemCommand
Measure-Object : The property "Length" cannot be found in the input for any objects.
At C:\Users\CHerSun\scoop\apps\scoop\current\libexec\scoop-info.ps1:123 char:64
+ ... ldItem $fileType -Recurse | Measure-Object -Property Length -Sum).Sum
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Measure-Object], PSArgumentException
+ FullyQualifiedErrorId : GenericMeasurePropertyNotFound,Microsoft.PowerShell.Commands.MeasureObjectCommand
Name : far
Description : A text-mode files and archives manager
Version : 30b6060 (Update to 3.0.6161 available)
Bucket : main
Website : https://farmanager.com
License : BSD-3-Clause (https://farmanager.com/license.php)
Updated at : 09.06.2023 23:24:25
Updated by : github-actions[bot]
Manifest : C:\Users\CHerSun\scoop\buckets\main\bucket\far.json
Installed : C:\Users\CHerSun\scoop\apps\far\30b6060
Installed size : Persisted data: 14,6 KB
Total: 14,6 KB
Binaries : far.exe
Current Scoop version:
v0.3.1 - Released at 2022-11-15
... Narrowed that down. pwsh runs everything correctly, windows original powershell (v5.1....) is where issue occurs. |
I'm unable to repro this in PowerShell 5.1 |
If you put the download link through https://httpheader.io/ you can see there is a 302 redirect, so Scoop gets the Content-Length of the first response but doesn't follow through any further. I'm not at my computer right now but it might be possible to send a follow up request if the HTTP status code is a redirect. You're very welcome to send a PR if you can! |
No, the issue pertains to a header that is being returned as an array. I'll fix it soon. |
When doing a > scoop list command, it would be very helpful to show what apps have updates available, next to it's version number. Yes, I know that doing scoop update shows new available, but when having many apps installed it's hard to keep track of all that, and the main update command only shows the most recent anyway, not ones it listed in the past.
Also, a upgrade command, like what apt-get does would help:
much like the way apt-get upgrade works, it would be nice for scoop to get the list of upgradable apps, then have it show which ones will upgrade and the amount of data it may take.
Oh, speaking of, it may be helpful to actually put the file sizes in the scoop buckets and have the install command confirm the download first, showing the file size. I have a data cap, so every byte counts.
The text was updated successfully, but these errors were encountered: