Skip to content

fix: normalize install path to Windows format on Git Bash - #351

Open
It-Energy-Ai wants to merge 1 commit into
darrenhinde:mainfrom
It-Energy-Ai:fix/windows-posix-paths
Open

fix: normalize install path to Windows format on Git Bash#351
It-Energy-Ai wants to merge 1 commit into
darrenhinde:mainfrom
It-Energy-Ai:fix/windows-posix-paths

Conversation

@It-Energy-Ai

@It-Energy-Ai It-Energy-Ai commented Aug 20, 2026

Copy link
Copy Markdown

Bug report + courtesy fix

Nota: non sono il maintainer di questo progetto. Questa e una segnalazione di bug con un fix di cortesia che il maintainer puo liberamente accettare, modificare o rifiutare.

Summary

When running install.sh <profile> --install-dir ~/.config/opencode under Git Bash on Windows, the installer rewrites .opencode/context references inside the installed files using HOME in POSIX form (/c/Users/...). Native Windows opencode (PowerShell) cannot resolve those paths, so context loading and the context files referenced in agents, commands, and context docs fail.

Repro

  1. Windows + Git Bash.
  2. bash install.sh developer --install-dir ~/.config/opencode
  3. Inspect ~/.config/opencode/agent/core/openagent.md - contains Read /c/Users/<user>/.config/opencode/context/core/standards/code-quality.md NOW
  4. Run opencode natively in PowerShell - path unresolvable.

Fix

Normalize expanded_path with cygpath -m when the platform is Windows, producing C:/Users/<user>/... (forward slashes with drive letter), which native Windows tools accept.

Impacted 53 installed files in my test (agents, subagents, commands, context files, skills).

On Windows, install.sh rewrote .opencode/context references inside installed files using HOME in POSIX form (/c/Users/...), which native opencode (PowerShell) cannot resolve. Use cygpath -m to emit C:/Users/... paths when the platform is Windows.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants