microsoft / winget-cli

WinGet is the Windows Package Manager. This project includes a CLI (Command Line Interface), PowerShell modules, and a COM (Component Object Model) API (Application Programming Interface).
https://learn.microsoft.com/windows/package-manager/
MIT License
22.99k stars 1.43k forks source link

Winget detecting Steam app ShareX #4826

Open tookender opened 15 hours ago

tookender commented 15 hours ago

Brief description of your issue

Running winget upgrade --all --include-unknown lists ShareX.ShareX as an installed app even though it is installed via Steam, resulting in an error.

> winget upgrade --all --include-unknown

Name   Id            Version Available Source
---------------------------------------------
ShareX ShareX.ShareX Unknown 16.1.0    winget
1 upgrades available.

(1/1) Found ShareX [ShareX.ShareX] Version 16.1.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...
Installer failed with exit code: 1
Installer log is available at: C:\Users\me\AppData\Local\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir\WinGet-ShareX.ShareX.16.1.0-2024-09-20-21-26-45.499.log

Steps to reproduce

  1. Install ShareX via Steam
  2. Run winget upgrade --all --include-unknown, watch it send an error about ShareX

Expected behavior

I expected it to not be detected by winget as it is installed by Steam.

Actual behavior

Winget is detecting ShareX as an application even though it is installed from Steam and giving an error when using the command.

Environment

❯ winget --info
Windows Package Manager v1.8.1911
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.22631.4169
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.23.1911.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
ProxyCommandLineOptions                   Disabled
DefaultProxy                              Disabled

I used Steam to install ShareX
tookender commented 15 hours ago

I don't think it should be detecting this as Steam already updates those apps, so there is no point. I understand winget is meant to detect already installed applications, but I don't think it makes sense to detect Steam apps.