microsoft / microsoft/winget-cli

Add download size warning for large files

Open
#1,130 6 comments 6 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Issue-Feature
Dominant language
C++
Stars
26.4k
Forks
1.8k
Avg merge
1d 11h
Merged PRs (30d)
15

Description

Description of the new feature/enhancement

I have been testing a manifest for a large install package (~1.2GB), and this has thrown up a couple of one issue:

  1. There is no warning to the user about the file size when running winget install ... (in my case, as I am still testing/validating this manifest, I am using the -m switch);
    2. The download of this 1.2GB file, from GitHub repository, was much, much slower (over a fast internet connection) than the equivalent download in a browser. It was painfully slow - 22 minutes (according to the logs) for a 1.2GB file that downloads in the browser in 7 minutes over the same connection (I did a timed comparison). It is also much slower than using the MIcrosoft Store for the same package.

Proposed technical implementation details (optional)

For 1, implement a Large Package Download warning for files in excess of, say, 50MB, with a prompt such as Warning downloading large package XXX GB/MB.... cancel with Ctrl-C (or something similar). This would ensure that the donwload starts and goes ahead if the install is unattended, but a user watching the download is given instructions on how to cancel. I know any script can be cancelled, but a lot of users might not know that. In any case, ideally it wouldn't just be a complete script abort: if the user cancels, it should (ideally) do some cleanup and post a "Cancelled on user request" message to the command prompt. Therefore you might want to use something other than Ctrl-C.

For 2, perhaps #225 could help. Otherwise, I have no explanation for the very slow download.
Other than that, I can report that the download and installation of the package was successful (but unacceptably slow).

EDIT: Item 2 must have been a transient network issue, as another dev has downloaded quickly, and I now corroborate having re-tested. I thnk item 1 above still stands.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the winget install download flow, including installs using the -m switch; the issue does not name a source file or test. Determine where the package size is available and how prompts and cancellation are handled. Done means large files, such as those over the proposed 50MB threshold, receive a clear warning while unattended installs continue.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.