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

pnpm missing from path after updating #3616

Open
sharunkumar opened this issue Sep 12, 2023 · 9 comments
Open

pnpm missing from path after updating #3616

sharunkumar opened this issue Sep 12, 2023 · 9 comments
Labels
Area-Path Issue related to path environment variable Issue-Bug It either shouldn't be doing this or needs an investigation. Portable Issue related to portable package

Comments

@sharunkumar
Copy link

sharunkumar commented Sep 12, 2023

Brief description of your issue

Updating pnpm when there is a new version available, removes pnpm from the PATH, so its no longer usable after the update, until the PC is restarted

Steps to reproduce

Install pnpm using winget
after a new version is available, update pnpm using winget

Expected behavior

pnpm.exe should be available in PATH

Actual behavior

➜ winget list pnpm
Name Id        Version Source
------------------------------
pnpm pnpm.pnpm 8.7.5   winget
➜ where.exe pnpm
INFO: Could not find files for the given pattern(s).

Environment

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

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

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 Sep 12, 2023
@stephengillie stephengillie added Issue-Bug It either shouldn't be doing this or needs an investigation. Area-Path Issue related to path environment variable and removed Needs-Triage Issue need to be triaged labels Sep 13, 2023
@denelon
Copy link
Contributor

denelon commented Sep 15, 2023

Unless the installer is doing something "interesting", you should just be able to close and reopen the terminal. Note: there is a difference between closing a tab in Windows Terminal and closing Windows Terminal. The latter is required to get a full environment variable refresh.

@sharunkumar
Copy link
Author

Yes I have closed the terminal completely, but it seems like the PATH doesn't contain pnpm

I notice a similar issue when installing portable apps. The installation would succeed, but the binary wouldn't be available in PATH unless I do a system reboot

@denelon
Copy link
Contributor

denelon commented Sep 20, 2023

Do you have "Developer Mode" enabled or disabled?
Did you install the portable application as a user or elevated in an administrator shell?

@denelon denelon added the Portable Issue related to portable package label Sep 20, 2023
@Clockwork-Muse
Copy link

FWIW, I think some variation of this is affecting me with the Yuzu package (YuzuEmu.Yuzu.Mainline), which is also a portable install - it's supposed to add an entry to path so it's available on the command line, but the entry keeps disappearing (not present at all in the user account environment variables view, etc).
Additionally, shortcuts or whatever is used to make the app findable on the start menu also disappear, meaning it's impossible to launch without manually searching through the relevant directories.

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

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

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

Do you have "Developer Mode" enabled or disabled?
Did you install the portable application as a user or elevated in an administrator shell?

  • Developer mode is off at the moment, although I believe it's been on before.
  • From a non-elevated prompt, although the user account is an admin.

@denelon
Copy link
Contributor

denelon commented Sep 22, 2023

OK, if the install was performed via the user account (not in an elevated prompt) and the Developer Mode was disabled, then a symbolic link wouldn't have worked. WinGet would have directly added the path to the portable .exe to the "path" environment variable.

@sharunkumar
Copy link
Author

Do you have "Developer Mode" enabled or disabled? Did you install the portable application as a user or elevated in an administrator shell?

Developer mode is not enabled and I installed using a user account (not elevated shell)

Should I update using an elevated shell for this to work as expected?

@Clockwork-Muse
Copy link

WinGet would have directly added the path to the portable .exe to the "path" environment variable.

It does, on install.

When I upgrade (via winget upgrade --all), the entry in path is removed.

@zeratax
Copy link

zeratax commented Oct 29, 2023

WinGet would have directly added the path to the portable .exe to the "path" environment variable.

It does, on install.

When I upgrade (via winget upgrade --all), the entry in path is removed.

this also seems to happen with yt-dlp and rufus? those are both gone now from my path and even reinstalling with --force doesn't seem to help.

@josh-hemphill
Copy link

Looks like it's a winget issue: #4044

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Path Issue related to path environment variable 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

6 participants