Skip to content

Commit 8ff6ebc

Browse files
committed
fix(non-interactive-env): always use unix-style env prefix for bash-only hook (fixes code-yeongyu#2344)
1 parent 83a80e2 commit 8ff6ebc

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/hooks/non-interactive-env/non-interactive-env-hook.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,10 @@ export function createNonInteractiveEnvHook(_ctx: PluginInput) {
5252
// The env vars (GIT_EDITOR=:, EDITOR=:, etc.) must ALWAYS be injected
5353
// for git commands to prevent interactive prompts.
5454

55-
const shellType = process.platform === "win32" ? "powershell" : "unix"
56-
const envPrefix = buildEnvPrefix(NON_INTERACTIVE_ENV, shellType)
55+
// Always use unix-style prefix: this hook only processes Bash tool commands
56+
// (guarded by the tool check above), so the prefix must be bash-compatible
57+
// regardless of the host OS shell (e.g., PowerShell on Windows).
58+
const envPrefix = buildEnvPrefix(NON_INTERACTIVE_ENV, "unix")
5759

5860
// Check if the command already starts with the prefix to avoid stacking.
5961
// This maintains the non-interactive behavior and makes the operation idempotent.

0 commit comments

Comments
 (0)