fix(test): use direct Node launcher on macOS

This commit is contained in:
morluto committed 2026-07-24 03:31:26 +00:00
1 parent 42fbbb297b
commit 13f3372a8b
3 files changed
+52 -2

No files matched your search

+26
View File
@@ -0,0 +1,26 @@
export interface PackageHopperEnvironment {
readonly HOPPER_LAUNCHER_PATH: string;
readonly HOPPER_LOADER_ARGS_JSON: string;
}
export function packageHopperEnvironment(
root: string,
platform?: string,
): PackageHopperEnvironment;
export function verifyPackageEnvironment(input: {
readonly root: string;
readonly workspace: string;
readonly evidenceRoot: string;
readonly referenceRoot: string;
}): Promise<{
readonly prefix: string;
readonly home: string;
readonly npxLog: string;
readonly claudeConfig: string;
readonly codexConfig: string;
readonly codexTarget: string;
readonly cursorConfig: string;
readonly cursorTarget: string;
readonly environment: Readonly<Record<string, string | undefined>>;
}>;
+2 -2
View File
@@ -92,9 +92,9 @@ export async function verifyPackageEnvironment({
};
}
const packageHopperEnvironment = (root) => {
export const packageHopperEnvironment = (root, platform = process.platform) => {
const fakeLauncher = join(root, "tests/fixtures/fakeLauncher.mjs");
if (process.platform === "win32")
if (platform !== "linux")
return {
HOPPER_LAUNCHER_PATH: process.execPath,
HOPPER_LOADER_ARGS_JSON: JSON.stringify([fakeLauncher]),