microsoft / winget-pkgs

The Microsoft community Windows Package Manager manifest repository
MIT License
8.32k stars 4.26k forks source link

[Package Issue]: HTTPie.HTTPie #128570

Open tilagnes opened 7 months ago

tilagnes commented 7 months ago

Please confirm these before moving forward

Category of the issue

Installation issue.

Brief description of your issue

httpie doesn't install with winget.

Steps to reproduce

Run winget install HTTPie.HTTPie from unelevated PowerShell 7.4.0.

Actual behavior

HTTPie is not installed and we see the following error:

Found HTTPie [HTTPie.HTTPie] Version 2023.3.6
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://github.com/httpie/desktop/releases/download/v2023.3.6/HTTPie-Setup-2023.3.6.exe
  ██████████████████████████████  74.7 MB / 74.7 MB
Successfully verified installer hash
Starting package install...
Installer failed with exit code: 3221225477

Expected behavior

I expect HTTPie 2023.3.6 to be installed.

Environment

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

Windows: Windows.Desktop v10.0.22631.2506
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.21.3133.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

Screenshots and Logs

No response

Dragon1573 commented 7 months ago

Unable to reproduce this issue.

It seems winget.exe will prefer machine scope installation than user scope. When running in an un-elevated pwsh.exe, the installer will query user for a UAC authorization.

PS> pwsh --version
PowerShell 7.4.0
PS> winget install HTTPie.HTTPie
已找到 HTTPie [HTTPie.HTTPie] 版本 2023.3.6
此应用程序由其所有者授权给你。
Microsoft 对第三方程序包概不负责,也不向第三方程序包授予任何许可证。
正在下载 https://github.com/httpie/desktop/releases/download/v2023.3.6/HTTPie-Setup-2023.3.6.exe
  ██████████████████████████████  74.7 MB / 74.7 MB
已成功验证安装程序哈希
正在启动程序包安装...
已成功安装

Are you administrators? Could you please try adding --scope User switch? No UAC pop up during installation.

PS Dragon1573 0ms > winget install -e HTTPie.HTTPie --scope User
已找到 HTTPie [HTTPie.HTTPie] 版本 2023.3.6
此应用程序由其所有者授权给你。
Microsoft 对第三方程序包概不负责,也不向第三方程序包授予任何许可证。
正在下载 https://github.com/httpie/desktop/releases/download/v2023.3.6/HTTPie-Setup-2023.3.6.exe
  ██████████████████████████████  74.7 MB / 74.7 MB
已成功验证安装程序哈希
正在启动程序包安装...
已成功安装
PS Dragon1573 36.26s >
stephengillie commented 7 months ago

I believe this might be the expected behavior when running from a user account where elevation isn't available. So would be a feature instead of a bug.

Feature request: Improve output message when a package fails to install because elevation isn't possible.

tilagnes commented 7 months ago

Thanks. Installing as user fixed the issue for me. Some error message explaining the issue or some metadata preventing installing system-wide from user context would be appreciated.