Fix desktop CLI environment boundary

This commit is contained in:
Mohamed Boudra
2026-04-23 07:08:24 +07:00
parent f65f82bac9
commit 9c5974735e
4 changed files with 38 additions and 8 deletions
@@ -0,0 +1,18 @@
import { describe, expect, it } from "vitest";
import { sanitizeNodeEntrypointEnv } from "./node-entrypoint-runner";
describe("node-entrypoint-runner", () => {
it("removes Electron node-mode env before loading the target entrypoint", () => {
const env = {
ELECTRON_RUN_AS_NODE: "1",
ELECTRON_NO_ATTACH_CONSOLE: "1",
PATH: "/usr/bin",
};
sanitizeNodeEntrypointEnv(env);
expect(env).toEqual({
PATH: "/usr/bin",
});
});
});