fix(#166): omit bash.exe wrapper for windows claude sh hooks (#203)

* fix(#166): omit bash.exe wrapper for windows claude sh hooks

* chore(#166): add changeset for windows claude sh hook fix

* fix(#166): reset exitCode in sdk bridge integration test
This commit is contained in:
Tom Boucher
2026-05-24 14:16:16 -04:00
committed by GitHub
parent 7bf06f7a68
commit 0dc3fd604c
4 changed files with 48 additions and 5 deletions

View File

@@ -178,6 +178,20 @@ describe('Bug #2979: buildHookCommand for .sh hooks still uses bare "bash" (POSI
});
assert.equal(cmd, null);
});
test('Windows Claude .sh hook omits explicit bash.exe wrapper (#166)', () => {
const cmd = buildHookCommand('C:/Users/me/.claude', 'gsd-session-state.sh', {
platform: 'win32',
runtime: 'claude',
env: { ProgramFiles: 'C:\\Program Files' },
existsSync: (candidate) => candidate === 'C:\\Program Files\\Git\\bin\\bash.exe',
});
assert.equal(
cmd,
'"C:/Users/me/.claude/hooks/gsd-session-state.sh"',
'Claude win32 .sh hooks should serialize as script-only commands'
);
});
});
// ─── #3002 CR follow-up: legacy-bare-node migration ─────────────────────────