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

Environment variable will not be updated but lost after updated #5048

Open
AustinZhang1024 opened this issue Dec 8, 2024 · 0 comments
Open
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

@AustinZhang1024
Copy link

Brief description of your issue

With user permission, install typstyle and update it, the environment variable will not be updated.

Steps to reproduce

At first, the environment variable is:

C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Users\Austin\AppData\Local\Microsoft\WindowsApps;

Install typstyle old version:
winget install typstyle -v 0.12.7 --source winget

Then the environment variable is:

C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Users\Austin\AppData\Local\Microsoft\WindowsApps;C:\Users\Austin\AppData\Local\Microsoft\WinGet\Packages\Enter-tainer.typstyle_Microsoft.Winget.Source_8wekyb3d8bbwe;

Now, update typstyle:
winget update typstyle

And now, after restart powershell, the environment variable becomes:

C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Users\Austin\AppData\Local\Microsoft\WindowsApps;

The typstyle path not updated but lost!

Expected behavior

The EV should be updated to

C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Users\Austin\AppData\Local\Microsoft\WindowsApps;C:\Users\Austin\AppData\Local\Microsoft\WinGet\Packages\Enter-tainer.typstyle_Microsoft.Winget.Source_8wekyb3d8bbwe;

Actual behavior

Shown as above

Environment

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

Windows: Windows.Desktop v10.0.26100.1742
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.24.25200.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
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Triage Issue need to be triaged label Dec 8, 2024
@denelon denelon added Issue-Bug It either shouldn't be doing this or needs an investigation. Portable Issue related to portable package Area-Path Issue related to path environment variable and removed Needs-Triage Issue need to be triaged labels Dec 9, 2024
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

2 participants