Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions news/changelog-1.6.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## In this release

- ([#12147](https://github.com/quarto-dev/quarto-cli/issues/12147)): `serif` and `simple` themes defaults back to have their heading color (`$presentation-heading-color`) to be the same as the body color (`$body-color`) as in Quarto 1.5.
- ([#11659](https://github.com/quarto-dev/quarto-cli/pull/11659)): Julia engine: Fix escaping bug where paths containing spaces or backslashes break server startup on Windows.

## In previous releases

Expand Down
24 changes: 14 additions & 10 deletions src/execute/julia.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import {
} from "../config/format.ts";
import { resourcePath } from "../core/resources.ts";
import { quartoRuntimeDir } from "../core/appdirs.ts";
import { normalizePath } from "../core/path.ts";
import { normalizePath, pathWithForwardSlashes } from "../core/path.ts";
import { isInteractiveSession } from "../core/platform.ts";
import { runningInCI } from "../core/ci-info.ts";
import { sleep } from "../core/async.ts";
Expand Down Expand Up @@ -248,6 +248,12 @@ export const juliaEngine: ExecutionEngine = {
},
};

function powershell_argument_list_to_string(...args: string[]): string {
// formats as '"arg 1" "arg 2" "arg 3"'
const inner = args.map((arg) => `"${arg}"`).join(" ");
return `'${inner}'`;
}

async function startOrReuseJuliaServer(
options: JuliaExecuteOptions,
): Promise<{ reused: boolean }> {
Expand All @@ -265,6 +271,7 @@ async function startOrReuseJuliaServer(
await ensureQuartoNotebookRunnerEnvironment(options);
juliaProject = juliaRuntimeDir();
} else {
juliaProject = pathWithForwardSlashes(juliaProject);
trace(
options,
`Custom julia project set via QUARTO_JULIA_PROJECT="${juliaProject}". Checking if QuartoNotebookRunner can be loaded.`,
Expand Down Expand Up @@ -310,15 +317,12 @@ async function startOrReuseJuliaServer(
"Start-Process",
options.julia_cmd,
"-ArgumentList",
// string array argument list, each element but the last must have a "," element after
"--startup-file=no",
",",
`--project=${juliaProject}`,
",",
resourcePath("julia/quartonotebookrunner.jl"),
",",
transportFile,
// end of string array
powershell_argument_list_to_string(
"--startup-file=no",
`--project=${juliaProject}`,
resourcePath("julia/quartonotebookrunner.jl"),
transportFile,
),
"-WindowStyle",
"Hidden",
],
Expand Down
Loading