Skip to content

Commit 0d4dfe5

Browse files
fix: match quarto's runtime dir path in julia engine test
The test's quartoRuntimeDir() reimplementation added a "quarto" segment to the XDG_RUNTIME_DIR path, but quarto's actual xdgUserRuntimeDir does not append the app name when XDG_RUNTIME_DIR is set. This caused the test to delete the log file at the wrong path on Linux CI, leaving the real log file intact and failing the "log file doesn't exist" step.
1 parent a70895e commit 0d4dfe5

File tree

1 file changed

+9
-3
lines changed
  • src/resources/extension-subtrees/julia-engine/tests/smoke/julia-engine

1 file changed

+9
-3
lines changed

src/resources/extension-subtrees/julia-engine/tests/smoke/julia-engine/julia.test.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,14 @@ function quartoRuntimeDir(): string {
2323
base = join(Deno.env.get("LOCALAPPDATA")!, "quarto");
2424
break;
2525
default: {
26+
// Note: quarto's xdgUserRuntimeDir does not append the app name
27+
// when XDG_RUNTIME_DIR is set (unlike the other XDG dir functions).
2628
const xdgRuntime = Deno.env.get("XDG_RUNTIME_DIR");
2729
if (xdgRuntime) {
28-
base = join(xdgRuntime, "quarto");
30+
base = xdgRuntime;
2931
} else {
30-
const cacheHome = Deno.env.get("XDG_CACHE_HOME") ?? join(Deno.env.get("HOME")!, ".cache");
32+
const cacheHome = Deno.env.get("XDG_CACHE_HOME") ??
33+
join(Deno.env.get("HOME")!, ".cache");
3134
base = join(cacheHome, "quarto");
3235
}
3336
break;
@@ -185,7 +188,10 @@ Deno.test("julia engine", async (t) => {
185188
},
186189
).outputSync();
187190
assertSuccess(force_close_output);
188-
assertStderrIncludes(force_close_output, "Worker force-closed successfully");
191+
assertStderrIncludes(
192+
force_close_output,
193+
"Worker force-closed successfully",
194+
);
189195

190196
const status_output_2 = new Deno.Command(
191197
quartoCmd(),

0 commit comments

Comments
 (0)