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

Directory Separators aren't normalized when adding Portable Packages to PATH #5033

Open
Trenly opened this issue Dec 3, 2024 · 1 comment
Labels
Area-Path Issue related to path environment variable Command-Install Issue related to WinGet Install Issue-Bug It either shouldn't be doing this or needs an investigation. Portable Issue related to portable package

Comments

@Trenly
Copy link
Contributor

Trenly commented Dec 3, 2024

Brief description of your issue

When a portable package is added to path, and it is in a Subfolder, the directory separators aren't normalized

Steps to reproduce

PS C:\Users\WDAGUtilityAccount\Desktop\winget-pkgs> winget install OtfriedCheong.Ipe
PS C:\Users\WDAGUtilityAccount\Desktop\winget-pkgs> echo $env:Path
C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Users\WDAGUtilityAccount\AppData\Local\Microsoft\WindowsApps;C:\Users\WDAGUtilityAccount\AppData\Local\Microsoft\WinGet\Packages\OtfriedCheong.Ipe__DefaultSource\ipe-7.2.28/bin

Expected behavior

All path separators should be normalized to the default separator character when adding packages to PATH, regardless of which directory separator was used in the manifest

Actual behavior

Directory separators may be mixed, depending on what was in the manifest

Environment

PS C:\Users\WDAGUtilityAccount\Desktop\winget-pkgs> winget --info
Windows Package Manager v1.9.25200
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.26100.2454
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.24.25200.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                        Enabled
BypassCertificatePinningForMicrosoftStore Disabled
InstallerHashOverride                     Disabled
LocalArchiveMalwareScanOverride           Enabled
ProxyCommandLineOptions                   Disabled
DefaultProxy                              Disabled
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Triage Issue need to be triaged label Dec 3, 2024
@Trenly
Copy link
Contributor Author

Trenly commented Dec 3, 2024

[Policy] Issue-Bug
[Policy] Portable
[Policy] Command-Install
[Policy] Area-Path

@microsoft-github-policy-service microsoft-github-policy-service bot added Area-Path Issue related to path environment variable Command-Install Issue related to WinGet Install Issue-Bug It either shouldn't be doing this or needs an investigation. Portable Issue related to portable package and removed Needs-Triage Issue need to be triaged labels Dec 3, 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 Command-Install Issue related to WinGet Install 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

1 participant