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.5k stars 1.39k forks source link

Github Desktopclear #4547

Closed caglaryalcin closed 2 weeks ago

caglaryalcin commented 2 weeks ago

Brief description of your issue

When installing Github Desktop with Winget, the file extension is incorrect and causes the Github Desktop Deployment Tool to be installed.

2024-06-11_19-18

Steps to reproduce

winget install GitHub.GitHubDesktop --force Found GitHub Desktop [GitHub.GitHubDesktop] Version 3.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://desktop.githubusercontent.com/github-desktop/releases/3.4.1-cb739340/GitHubDesktopSetup-x64.msi ██████████████████████████████ 151 MB / 151 MB Successfully verified installer hash Starting package install... Successfully installed

Expected behavior

false: https://desktop.githubusercontent.com/github-desktop/releases/3.4.1-cb739340/GitHubDesktopSetup-x64.msi

true: https://desktop.githubusercontent.com/github-desktop/releases/3.4.1-cb739340/GitHubDesktopSetup-x64.exe

Actual behavior

It loads incorrectly with Winget.

Environment

PS C:\Users\m4a1> winget --info
Windows Package Manager v1.7.11261
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.22631.2861
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.22.11261.0

Winget Directories
-------------------------------------------------------------------------------------------------------------------------------
Logs                               %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir
User Settings                      %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json
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
denelon commented 2 weeks ago

WinGet has its own logical order for determining which installer to use for a given package.

The assumption here is the package is not currently installed on the device. If all installer types are available, the preference is:

  1. MSIX
  2. MSI (or variations)
  3. exe-based installer
  4. portable

If you run winget show GitHub.GitHubDesktop WinGet will show the URL it would default to for an install.

To override the installer type you can pass "--installer-type" as a parameter with the preferred type.

You can run winget show GitHub.GitHubDesktop --installer-type exe to see the difference.

To get the .exe based version, you would run winget install GitHub.GitHubDesktop --installer-type exe.