-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Description
Prerequisites
- I have searched existing issues to avoid duplicates
- I am using the latest version of oh-my-opencode
- I have read the documentation
Bug Description
This appears to be a regression / incomplete fix of the previously closed Windows shell compatibility issue.
On Windows, non-interactive-env still prepends a Unix-style export ...; prefix to git commands in v3.10.0, which breaks execution in cmd.exe and PowerShell.
The previous issue #566 was closed, but the current v3.10.0 build still contains a hardcoded Unix shell type in the compiled hook implementation.
Steps to Reproduce
- Install the latest package:
npm install -g oh-my-opencode@3.10.0
- Use OpenCode on Windows with
oh-my-opencodeenabled. - Execute a git command through the bash tool, for example
git status. - Observe that the command is rewritten with a Unix-style prefix:
export CI=true DEBIAN_FRONTEND=noninteractive GIT_TERMINAL_PROMPT=0 ...; git status - In Windows shells this fails with:
'export' is not recognized as an internal or external command, operable program or batch file.
Expected Behavior
The hook should either:
- detect the actual shell and emit shell-appropriate syntax, or
- avoid prepending Unix syntax on Windows entirely, or
- only run when the environment is truly non-interactive.
Actual Behavior
non-interactive-env still prepends a Unix export ...; prefix on Windows in the latest release.
Evidence
Local verification after upgrading to 3.10.0:
-
Installed package version:
C:\Users\hacke\AppData\Roaming\npm\node_modules\oh-my-opencode\package.json"version": "3.10.0"
-
Compiled hook implementation still contains:
C:\Users\hacke\AppData\Roaming\npm\node_modules\oh-my-opencode\dist\index.js:40242const envPrefix = buildEnvPrefix(NON_INTERACTIVE_ENV, "unix");
-
The shell-aware helper still exists in the same build:
C:\Users\hacke\AppData\Roaming\npm\node_modules\oh-my-opencode\dist\index.js:17322function buildEnvPrefix(env, shellType) { ... }- with explicit branches for
unix,powershell, andcmd
So the issue is not that shell-specific support is missing globally; it is that this hook still forces "unix".
Workaround
Disabling the hook avoids the problem:
{
"disabled_hooks": ["non-interactive-env"]
}Additional Context
Related previously closed issue: #566
This new report is specifically about the latest release (v3.10.0) still shipping code that hardcodes Unix behavior in the Windows path.
Operating System
Windows
OpenCode Version
opencode-ai 1.2.20