microsoft / microsoft/winget-cli
Agreements block `--all` functionality
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 26.4k
- Forks
- 1.8k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 15
Description
Brief description of your issue
If many packages have an upgrade available, and one has an Agreements section that requires the --accept-package-agreements switch, but this switch isn't provided - then the whole upgrade operation is cancelled, instead of upgrading the packages that don't have Agreements sections.
Steps to reproduce
PS C:\Users\Gilgamech> winget upgrade --all --include-pinned
Name Id Version Available Source
-----------------------------------------------------------------------
Git Git.Git 2.43.0 2.44.0 winget
Microsoft Edge Microsoft.Edge 122.0.2365.92 122.0.2365.106 winget
Shotcut Meltytech.Shotcut 24.01.28 24.02.29 winget
SourceTree Atlassian.Sourcetree 3.4.16 3.4.17 winget
Google Chrome Google.Chrome 123.0.6312.58 123.0.6312.59 winget
5 upgrades available.
1 package(s) have version numbers that cannot be determined. Use --include-unknown to see all results.
Agreements for Sourcetree [Atlassian.Sourcetree] Version 3.4.17
Version: 3.4.17
Publisher: Atlassian
Publisher Url: https://www.atlassian.com
Publisher Support Url: https://support.atlassian.com/sourcetree
Author: Atlassian Pty Ltd, Atlassian, Inc.
Homepage: https://www.sourcetreeapp.com
License: Proprietary
License Url: https://www.atlassian.com/legal/software-license-agreement
Privacy Url: https://www.atlassian.com/legal/privacy-policy
Copyright: Copyright (c) 2021 Atlassian Pty Ltd, Atlassian, Inc.
Agreements:
End User License Agreement (EULA): https://www.atlassian.com/legal/software-license-agreement
Package agreements were not agreed to. Operation cancelled.
3 package(s) have version numbers that cannot be determined. Use --include-unknown to see all results.
PS C:\Users\Gilgamech>
Expected behavior
Of the 5 applications with an upgrade available, I believe only 1 has an Agreements, so the other 4 should be upgraded. Also, the error message should give some remediation tips, such as "Review the Agreement provided above, and if you accept its terms, use --accept-package-agreements to continue with the install."
Actual behavior
Package agreements were not agreed to. Operation cancelled.
Environment
Windows Package Manager v1.7.10661
Copyright (c) Microsoft Corporation. All rights reserved.
Windows: Windows.Desktop v10.0.22631.3296
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.22.10661.0
Winget Directories
-----------------------------------------------------------------------------------------------------------------------
Logs %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\Diag…
User Settings %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\sett…
Portable Links Directory (User) %LOCALAPPDATA%\Microsoft\WinGet\Links
Portable Links Directory (Machine) C:\Program Files\WinGet\Links
Portable Package Root (User) %LOCALAPPDATA%\Microsoft\WinGet\Packages
Portable Package Root C:\Program Files\WinGet\Packages
Portable Package Root (x86) C:\Program Files (x86)\WinGet\Packages
Installer Downloads %USERPROFILE%\Downloads
Links
---------------------------------------------------------------------------
Privacy Statement https://aka.ms/winget-privacy
License Agreement https://aka.ms/winget-license
Third Party Notices https://aka.ms/winget-3rdPartyNotice
Homepage https://aka.ms/winget
Windows Store Terms https://www.microsoft.com/en-us/storedocs/terms-of-sale
Admin Setting State
--------------------------------------------------
LocalManifestFiles Disabled
BypassCertificatePinningForMicrosoftStore Disabled
InstallerHashOverride Disabled
LocalArchiveMalwareScanOverride Disabled
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with winget upgrade --all --include-pinned using the package and agreement conditions shown. Trace the upgrade flow for package agreements and verify that packages without agreements still upgrade, while the agreement-dependent package is skipped with remediation guidance about --accept-package-agreements.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, powershell
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100