feat: add cross-platform support for hooks executor (#623)
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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", () => {
|
||||
|
||||
@@ -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", () => {
|
||||
|
||||
Reference in New Issue
Block a user