Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Portable packages installed in user scope are removed from PATH after upgrading them #4044

Open
soredake opened this issue Jan 8, 2024 · 7 comments
Labels
Command-Upgrade Issue related to WinGet Upgrade Issue-Bug It either shouldn't be doing this or needs an investigation. Portable Issue related to portable package

Comments

@soredake
Copy link

soredake commented Jan 8, 2024

Brief description of your issue

Portable packages installed in user scope are removed from PATH after upgrading them.

Steps to reproduce

  1. winget install yt-dlp.yt-dlp -v 2023.11.16 → yt-dlp added to PATH
  2. winget install gyan.ffmpeg -v 6.1 → ffmpeg added to PATH
  3. winget upgrade yt-dlp.yt-dlp → yt-dlp removed from PATH
  4. winget upgrade gyan.ffmpeg → ffmpeg removed from PATH

Expected behavior

Portable packages should not be removed from PATH after upgrading them.

Actual behavior

Portable packages are removed from PATH after upgrading them.

Environment

Windows Package Manager (Preview) v1.7.3481-preview
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.22631.2861
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.22.3481.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                        Enabled
BypassCertificatePinningForMicrosoftStore Disabled
InstallerHashOverride                     Disabled
LocalArchiveMalwareScanOverride           Disabled
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Triage Issue need to be triaged label Jan 8, 2024
@denelon denelon added Issue-Bug It either shouldn't be doing this or needs an investigation. Command-Upgrade Issue related to WinGet Upgrade Portable Issue related to portable package and removed Needs-Triage Issue need to be triaged labels Jan 8, 2024
@AzureArmageddon
Copy link

AzureArmageddon commented Jan 9, 2024

Able to replicate. This pesky bug makes using certain CLI apps via WinGet quite impossible.

Here's my winget --info:

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

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

The above says Windows 10 or something but I'm on Windows 11 so here's the OS version information:

Edition	Windows 11 Home
Version	22H2
Installed on	‎22/‎11/‎22
OS build	22621.2861
Experience	Windows Feature Experience Pack 1000.22681.1000.0

@soredake soredake changed the title Portable packages installed in user scope with admin rights are removed from PATH after upgrading them Portable packages installed in user scope are removed from PATH after upgrading them Jan 18, 2024
@curioussabhi
Copy link

curioussabhi commented Feb 4, 2024

I also have this issue. Had to remove and reinstall the package to get it added to PATH again (didn't want to mess with PATH manually).

@akulbe
Copy link

akulbe commented May 25, 2024

@josh-hemphill Is this only happen on upgrade? I'm having things not showing up on $PATH even on new install.

@josh-hemphill
Copy link

@josh-hemphill Is this only happen on upgrade? I'm having things not showing up on $PATH even on new install.

For me, yes, fresh installs do show up in path, if it's not, maybe it's package specific. For me I only noticed it with pnpm

@Sammy-T
Copy link

Sammy-T commented Sep 1, 2024

I'm also having this issue while trying to update pnpm. Is someone able to confirm whether this is a winget issue or a package issue?

@auanasgheps
Copy link

I have this issue as well. Anyone from the team?

@auanasgheps
Copy link

Hello, commenting again because I just encountered this issue, again.
Updated gallery-dl and its path was removed.
winget v1.8.1911.
I can always replicate the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Command-Upgrade Issue related to WinGet Upgrade Issue-Bug It either shouldn't be doing this or needs an investigation. Portable Issue related to portable package
Projects
None yet
Development

No branches or pull requests

8 participants