* 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:
@@ -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 ─────────────────────────
|
||||
|
||||
@@ -28,11 +28,16 @@
|
||||
* surface the cause directly rather than silently masking under fallback.
|
||||
*/
|
||||
|
||||
const { test, describe } = require('node:test');
|
||||
const { test, describe, afterEach } = require('node:test');
|
||||
const assert = require('node:assert/strict');
|
||||
const path = require('node:path');
|
||||
|
||||
const BRIDGE_PATH = path.join(__dirname, '..', 'get-shit-done', 'bin', 'lib', 'cjs-sdk-bridge.cjs');
|
||||
const initialExitCode = process.exitCode;
|
||||
|
||||
afterEach(() => {
|
||||
process.exitCode = initialExitCode;
|
||||
});
|
||||
|
||||
describe('cjs-sdk-bridge: SDK runtime bridge integration', () => {
|
||||
test('tryLoadSdk() resolves the bundled SDK on the current checkout', () => {
|
||||
|
||||
Reference in New Issue
Block a user