fix(ghidra): avoid nested quotes in Windows Java options

This commit is contained in:
morluto
2026-10-06 02:22:18 +08:00
parent bede3e3c60
commit a574b744b8
2 changed files with 11 additions and 4 deletions
@@ -200,6 +200,13 @@ describe("Ghidra headless launcher", () => {
expect(capture.environment.GHIDRA_HEADLESS_JAVA_OPTIONS).toContain(
`-Duser.home=${join(runtimeRoot, "home")}`,
);
expect(capture.environment.GHIDRA_HEADLESS_JAVA_OPTIONS).toBe(
`-Duser.home=${join(runtimeRoot, "home")} -Djava.io.tmpdir=${join(runtimeRoot, "tmp")}`,
);
if (process.platform === "win32")
expect(capture.environment.GHIDRA_HEADLESS_JAVA_OPTIONS).not.toContain(
'"',
);
if (process.platform !== "win32")
expect(
(await stat(join(runtimeRoot, "ownership.json"))).mode & 0o777,