feat: add cross-platform support for hooks executor (#623)

This commit is contained in:
jnjpng
2026-01-21 22:30:20 -08:00
committed by GitHub
parent 388cbd6e25
commit 547f5047d3
4 changed files with 192 additions and 103 deletions

View File

@@ -15,7 +15,8 @@ import { join } from "node:path";
const projectRoot = process.cwd();
// Skip on Windows - hooks executor uses `sh -c` which doesn't exist on Windows
// Skip on Windows - test commands use bash syntax (>>, &&, cat, etc.)
// The executor itself is cross-platform, but these test commands are bash-specific
const isWindows = process.platform === "win32";
interface TestEnv {

View File

@@ -16,7 +16,8 @@ import {
type StopHookInput,
} from "../../hooks/types";
// Skip on Windows - hooks executor uses `sh -c` which doesn't exist on Windows
// Skip on Windows - test commands use bash syntax (&&, >&2, sleep, etc.)
// The executor itself is cross-platform, but these test commands are bash-specific
const isWindows = process.platform === "win32";
describe.skipIf(isWindows)("Hooks Executor", () => {

View File

@@ -21,7 +21,8 @@ import {
runUserPromptSubmitHooks,
} from "../../hooks";
// Skip on Windows - hooks executor uses `sh -c` which doesn't exist on Windows
// Skip on Windows - test commands use bash syntax (&&, >&2, etc.)
// The executor itself is cross-platform, but these test commands are bash-specific
const isWindows = process.platform === "win32";
describe.skipIf(isWindows)("Hooks Integration Tests", () => {