KEMBAR78
Only download during COM download by JohnMcPMS · Pull Request #5327 · microsoft/winget-cli · GitHub
Skip to content

Conversation

JohnMcPMS
Copy link
Member

@JohnMcPMS JohnMcPMS commented Mar 26, 2025

Fixes #4661

Issue

When download was added, the COM download and install split for dependencies was accidentally implemented. But it was validated only with download in mind, so the download part worked for download intent. With dependencies, the split basically attempted to install the dependencies twice, causing a failure on the second attempt due to internal assertions.

Change

For the COM download command, explicitly force that we are only downloading.

Validation

Added a test that reproduces the double install attempt and verified that it failed at the attempt to move backward in execution phase. Test succeeds after the change.

Microsoft Reviewers: Open in CodeFlow

@JohnMcPMS JohnMcPMS requested a review from a team as a code owner March 26, 2025 21:07
@microsoft-github-policy-service microsoft-github-policy-service bot added the Issue-Bug It either shouldn't be doing this or needs an investigation. label Mar 26, 2025
yao-msft
yao-msft previously approved these changes Mar 26, 2025
@JohnMcPMS JohnMcPMS merged commit aca2fc3 into microsoft:master Mar 27, 2025
9 checks passed
@JohnMcPMS JohnMcPMS deleted the com-deps-simple branch March 27, 2025 20:42
JohnMcPMS added a commit to JohnMcPMS/winget-cli that referenced this pull request Apr 1, 2025
Fixes microsoft#4661

## Issue
When `download` was added, the COM download and install split for
dependencies was accidentally implemented. But it was validated only
with download in mind, so the download part worked for download intent.
With dependencies, the split basically attempted to install the
dependencies twice, causing a failure on the second attempt due to
internal assertions.

## Change
For the COM download command, explicitly force that we are only
downloading.
JohnMcPMS added a commit that referenced this pull request Apr 1, 2025
Cherry pick #5327 to 1.10

## Issue
When `download` was added, the COM download and install split for
dependencies was accidentally implemented. But it was validated only
with download in mind, so the download part worked for download intent.
With dependencies, the split basically attempted to install the
dependencies twice, causing a failure on the second attempt due to
internal assertions.

## Change
For the COM download command, explicitly force that we are only
downloading.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Issue-Bug It either shouldn't be doing this or needs an investigation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PowerShell client fails to install certain packages which work with the winget CLI

2 participants