-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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(scoop-info): Show app installed/download size #4886
feat(scoop-info): Show app installed/download size #4886
Conversation
Hey, this looks great, but I think you forgot to use the $verbose switch 😅 |
Oops, yeah I totally forgot! I added the check now :) |
There's a catch here. When showing installed size, the code shows the sizes for previous app versions too. This is a bit wrong IMO, since the 'App size' will be double or triple (if there are 2/3 older versions kept) the actual size. One solution is to show another category 'Previous versions' and show their sizes separately from the 'current' version size. |
Co-authored-by: Rashil Gandhi <[email protected]>
Now it looks like this:
I had to make the category names a bit longer to make them line up roughly. Would it be a good idea to add further spaces so that they line up perfectly like so:
Or maybe a '-----' divider before the total? Or keep it as it is? |
Yes! |
Okay, sorted. Now each total lines up in a column :) |
Idea: Should we omit a particular size field if its value is |
Output is now as short as possible 🚀 For app with files in each category:
App with no old versions:
App with no persisted data:
App with no cache either:
|
@niheaven can this feature be released in 0.2.2? It's been sitting for a while. |
Will review tomorrow and find something to tweak at a glance. v0.2.2 fixes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some tweak, and been tested
Simplify `| Where-Object ...` to `-Filter` Replace `totalSize` counter with `coalesce` function from `lib\core.ps1` Move `currentFiles` counter into main `foreach` loop Simplify categorised output by applying `filesize` afterwards Simplify architecture check for download size with `url` function from `lib\manifest.ps1` Co-authored-by: Hsiao-nan Cheung <[email protected]>
Thanks for the review and tweaks! I think it's ready now, I've tested it all too. I only found one issue but I think it's not related to my changes - I'll open up an issue after this is merged into develop. (if you install an app with [email protected] syntax, it does not show up in |
Co-authored-by: Rashil Gandhi <[email protected]> Co-authored-by: Hsiao-nan Cheung <[email protected]>
Description
scoop info
command when using the-v
verbose switchContent-Length
header from the download server. It will add up the total for each file given in the manifest.For example, for installed apps:
Another example with a not yet installed app:
An example with an app that is uninstalled but the latest version can be installed using cache:
Motivation and Context
scoop info
#4840status
command #2381How Has This Been Tested?
Checklist: