Skip to content

[Windows] v0.9.0 install never adds ~/.local/bin to the user PATH — appends bash export PATH=... to ~/.profile and prints a misleading "PATH already includes #1455

Description

@cyberlieflife

Version

codebase-memory-mcp 0.9.0

Platform

Windows (x64)

Install channel

GitHub release archive / install.sh / install.ps1

Binary variant

standard

What happened, and what did you expect?

After a successful install, the codebase-memory-mcp command cannot be run from a new terminal:

PS C:\Users\cyber> codebase-memory-mcp --version
codebase-memory-mcp : 无法将“codebase-memory-mcp”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。
CommandNotFoundException

The installer prints PATH already includes C:/Users/cyber/.local/bin and instructs the user to run source C:/Users/cyber/.profile, but on Windows:

  • cbm_detect_shell_rc() (src/cli/cli.c, lines 198–235) never matches the SHELL env var against /zsh, /bash, or /fish on Windows, so it falls back to ~/.profile.
  • cbm_ensure_path() (lines 2299–2348) has no _WIN32 branch: it appends the bash line export PATH="C:/Users/cyber/.local/bin:$PATH" to C:\Users\cyber\.profile. PowerShell and CMD do not read .profile, so the user PATH is never actually updated — no write to HKCU\Environment\Path.
  • The PATH already includes ... message is decided by checking whether that exact line already exists in the rc file (cbm_ensure_path returning CLI_TRUE), not by inspecting the real PATH environment variable — so it is misleading on Windows.

Expected: on Windows the installer adds %USERPROFILE%\.local\bin to the user PATH via the registry (e.g. setx or [Environment]::SetEnvironmentVariable("Path", ..., "User")) and prints a PowerShell-appropriate message instead of source ~/.profile.

Reproduction

  1. Fresh Windows 11 machine, run install.ps1 from the v0.9.0 release archive.
  2. Note the output PATH already includes C:/Users/xxx/.local/bin and Restart your shell or run: source C:/Users/xxx/.profile.
  3. Open a new PowerShell or CMD window.
  4. Run codebase-memory-mcp --versionCommandNotFoundException.
  5. Inspect C:\Users\xxx\.profile → it contains # Added by codebase-memory-mcp install and export PATH="C:/Users/xxx/.local/bin:$PATH".
  6. Run [Environment]::GetEnvironmentVariable("Path", "User")C:\Users\xxx\.local\bin is absent.

Logs

PATH already includes C:/Users/xxx/.local/bin
Install complete. Restart your shell or run:
  source C:/Users/xxx/.profile
PS C:\Users\xxx> codebase-memory-mcp --version
codebase-memory-mcp : 无法将“codebase-memory-mcp”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,
如果包括路径,请确保路径正确,然后再试一次。
所在位置 行:1 字符: 1
+ codebase-memory-mcp --version
+ ~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (codebase-memory-mcp:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Diagnostics trajectory (memory / performance / leak issues)


Project scale (if relevant)

No response

Confirmations

  • I searched existing issues and this is not a duplicate.
  • My reproduction uses shareable code (a dummy snippet or a public OSS repository), not proprietary code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingeditor/integrationEditor compatibility and CLI integrationwindowsWindows-specific issues

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions