Skip to content

winget upgrade --all gets cancelled if winget needs to be updated #4283

Open
@sba923

Description

Brief description of your issue

If winget upgrade --all is run and winget needs upgrading, the whole command is aborted.

Steps to reproduce

On a system where winget v1.22.10582.0 is install, run winget upgrade --all.

The upgrade process will start, then abort after reaching winget.

Expected behavior

winget should either update itself last, or defer the update after the whole command has been run. Or even better: update itself first, then proceed with the rest of the updates.

Actual behavior

PS> winget upgrade --all; Remove-UselessDesktopShortcuts.ps1
Name                                              Id                                Version       Available      Source
-----------------------------------------------------------------------------------------------------------------------
Creative App version 1.16.15.00                   CreativeTechnology.CreativeApp    1.16.15.00    1.16.16.00     winget
FileMenu Tools 8.4                                LopeSoft.FileMenuTools            8.4           8.4.1          winget
KDiff3                                            KDE.KDiff3                        1.10.6        1.10.7         winget
MKVToolNix 82.0.0 (64-bit)                        MoritzBunkus.MKVToolNix           82.0.0        83.0.0         winget
MediaInfo 23.11                                   MediaArea.MediaInfo.GUI           23.11         24.01          winget
App Installer                                     Microsoft.AppInstaller            1.22.10582.0  1.22.10661.0   winget
WinDbg                                            Microsoft.WinDbg                  1.2308.2002.0 1.2402.24001.0 winget
Oh My Posh version 19.11.7                        JanDeDobbeleer.OhMyPosh           19.11.7       19.17.2        winget
iMazing                                           DigiDNA.iMazing                   2.17.17.0     2.17.18.0      winget
Microsoft .NET SDK 6.0.419 (x64)                  Microsoft.DotNet.SDK.6            6.0.419       6.0.420        winget
Microsoft .NET SDK 6.0.321 (x64)                  Microsoft.DotNet.SDK.6            6.0.321       6.0.420        winget
Microsoft Visual C++ 2015-2022 Redistributable (… Microsoft.VCRedist.2015+.x86      14.38.33135.0 14.40.33617.1  winget
Microsoft Visual Studio Code (User)               Microsoft.VisualStudioCode        1.87.0        1.87.2         winget
Microsoft .NET SDK 7.0.203 (x64)                  Microsoft.DotNet.SDK.7            7.0.203       7.0.407        winget
Go Programming Language amd64 go1.22.0            GoLang.Go                         1.22.0        1.22.1         winget
MobaXterm                                         Mobatek.MobaXterm                 23.6.0.5186   24.0.0.5204    winget
Microsoft .NET SDK 7.0.314 (x64)                  Microsoft.DotNet.SDK.7            7.0.314       7.0.407        winget
PowerToys (Preview) x64                           Microsoft.PowerToys               0.78.0        0.79.0         winget
Microsoft Visual C++ 2015-2022 Redistributable (… Microsoft.VCRedist.2015+.x64      14.38.33135.0 14.40.33617.1  winget
Microsoft Windows Desktop Runtime - 6.0.27 (x64)  Microsoft.DotNet.DesktopRuntime.6 6.0.27        6.0.28         winget
Microsoft Windows Desktop Runtime - 6.0.27 (x86)  Microsoft.DotNet.DesktopRuntime.6 6.0.27        6.0.28         winget
Microsoft .NET SDK 7.0.313 (x64)                  Microsoft.DotNet.SDK.7            7.0.313       7.0.407        winget
Microsoft Windows Desktop Runtime - 7.0.16 (x64)  Microsoft.DotNet.DesktopRuntime.7 7.0.16        7.0.17         winget
23 upgrades available.
1 package(s) have version numbers that cannot be determined. Use --include-unknown to see all results.
1 package(s) have pins that prevent upgrade. Use the 'winget pin' command to view and edit pins. Using the --include-pinned argument may show more results.

Installing dependencies:
This package requires the following dependencies:
  - Packages
      Microsoft.UI.Xaml.2.8 [>= 8.2310.30001.0]
(1/19) Found Creative App [CreativeTechnology.CreativeApp] Version 1.16.16.00
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Downloading https://files.creative.com/creative/bin/apps/swureleases/win/creativeapp/release/CreativeAppSetup_1.16.16.00.exe
  ██████████████████████████████  76.7 MB / 76.7 MB
Successfully verified installer hash
Starting package install...
Successfully installed

(2/19) Found FileMenu Tools [LopeSoft.FileMenuTools] Version 8.4.1
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Downloading https://www.lopesoft.com/fmtools/FileMenuTools-setup.exe
  ██████████████████████████████  11.6 MB / 11.6 MB
Successfully verified installer hash
Starting package install...
Successfully installed

(3/19) Found KDiff3 [KDE.KDiff3] Version 1.10.7
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Downloading https://download.kde.org/stable/kdiff3/kdiff3-1.10.7-windows-x86_64.exe
  ██████████████████████████████  66.8 MB / 66.8 MB
Successfully verified installer hash
Starting package install...
Successfully installed

(4/19) Found MKVToolNix [MoritzBunkus.MKVToolNix] Version 83.0.0
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Downloading https://mkvtoolnix.download/windows/releases/83.0/mkvtoolnix-64-bit-83.0-setup.exe
  ██████████████████████████████  25.3 MB / 25.3 MB
Successfully verified installer hash
Starting package install...
Successfully installed

(5/19) Found MediaInfo [MediaArea.MediaInfo.GUI] Version 24.01
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Downloading https://mediaarea.net/download/binary/mediainfo-gui/24.01.1/MediaInfo_GUI_24.01.1_Windows.exe
  ██████████████████████████████  6.33 MB / 6.33 MB
Successfully verified installer hash
Starting package install...
Successfully installed

(6/19) Found App Installer [Microsoft.AppInstaller] Version 1.22.10661.0
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Successfully verified installer hash
Starting package install...
  ████████████████████████████▌   95%
Successfully installed. Restart the application to complete the upgrade.

Cancelled
22 package(s) have version numbers that cannot be determined. Use --include-unknown to see all results.

Environment

Windows Package Manager v1.7.10661
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.22631.3235
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

(version info is obviously not the version that was in effect when the problem occurred)

Metadata

Assignees

No one assigned

    Labels

    Command-UpgradeIssue related to WinGet UpgradeIssue-BugIt either shouldn't be doing this or needs an investigation.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions