Skip to content

bug: Pathman remove is path separator sensitive #12

@chipbite

Description

@chipbite

Describe the bug

Lazy for this one, see previous reports, here is my test in cmd.exe, first TLDR:

C:\Users\mawid6>%userprofile%\bin\pathman.exe add "~/bin"
The operation completed successfully.

C:\Users\mawid6>%userprofile%\bin\pathman.exe remove ~\bin
PATH not changed.

C:\Users\mawid6>%userprofile%\bin\pathman.exe remove ~/bin
The operation completed successfully.
Saved PATH changes.

Complete:

C:\Users\mawid6>reg query "HKCU\Environment"

HKEY_CURRENT_USER\Environment
    Path    REG_SZ    C:\Users\mawid6\AppData\Local\Programs\Python\Python313\Scripts\;C:\Users\mawid6\AppData\Local\Programs\Python\Python313\;C:\Users\mawid6\AppData\Local\Programs\Python\Launcher\;%USERPROFILE%\AppData\Local\Microsoft\WindowsApps;C:\Users\mawid6\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\mawid6\AppData\Local\Microsoft\WinGet\Links;C:\Users\mawid6\AppData\Roaming\npm;%USERPROFILE%\go\bin
    TEMP    REG_EXPAND_SZ    %USERPROFILE%\AppData\Local\Temp
    TMP    REG_EXPAND_SZ    %USERPROFILE%\AppData\Local\Temp
    OneDrive    REG_EXPAND_SZ    C:\oned\OneDrive - Inter IKEA Group
    GOPATH    REG_EXPAND_SZ    %USERPROFILE%\go
    OneDriveCommercial    REG_EXPAND_SZ    C:\oned\OneDrive - Inter IKEA Group


C:\Users\mawid6>%userprofile%\bin\pathman.exe add "~/bin"
The operation completed successfully.
Saved PATH changes. To set the PATH immediately, update the current session:

        PATH C:\Users\mawid6/bin;%PATH%



C:\Users\mawid6>%userprofile%\bin\pathman.exe remove ~\bin
PATH not changed.


C:\Users\mawid6>reg query "HKCU\Environment"

HKEY_CURRENT_USER\Environment
    Path    REG_SZ    C:\Users\mawid6/bin;C:\Users\mawid6\AppData\Local\Programs\Python\Python313\Scripts\;C:\Users\mawid6\AppData\Local\Programs\Python\Python313\;C:\Users\mawid6\AppData\Local\Programs\Python\Launcher\;%USERPROFILE%\AppData\Local\Microsoft\WindowsApps;C:\Users\mawid6\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\mawid6\AppData\Local\Microsoft\WinGet\Links;C:\Users\mawid6\AppData\Roaming\npm;%USERPROFILE%\go\bin
    TEMP    REG_EXPAND_SZ    %USERPROFILE%\AppData\Local\Temp
    TMP    REG_EXPAND_SZ    %USERPROFILE%\AppData\Local\Temp
    OneDrive    REG_EXPAND_SZ    C:\oned\OneDrive - Inter IKEA Group
    GOPATH    REG_EXPAND_SZ    %USERPROFILE%\go
    OneDriveCommercial    REG_EXPAND_SZ    C:\oned\OneDrive - Inter IKEA Group


C:\Users\mawid6>%userprofile%\bin\pathman.exe remove ~\bin
PATH not changed.


C:\Users\mawid6>%userprofile%\bin\pathman.exe remove ~/bin
The operation completed successfully.
Saved PATH changes.


C:\Users\mawid6>

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions