Skip to content

Commit b56f0e9

Browse files
authored
Merge branch 'main' into fix/html-escape-localizedString
2 parents 5468535 + 8ad252e commit b56f0e9

File tree

2 files changed

+20
-10
lines changed

2 files changed

+20
-10
lines changed

news/changelog-1.7.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,12 @@ All changes included in 1.7:
3939
- Expose new `quarto.paths.tinytex_bin_dir` in Quarto's Lua API. If TinyTeX is found by Quarto, this will be set to the path to the `bin` directory of the TinyTeX installation where command line tool are located (e.g., `pdflatex`, `tlmgr`, etc.). If TinyTeX is not found, this will be `nil`, meaning Quarto will use the system PATH to find the command line tools.
4040
- Fix `pandoc.mediabag` Lua typings so autocompletions work with the Lua LSP integration.
4141

42+
## Engines
43+
44+
### `julia`
45+
46+
- ([#11659](https://github.com/quarto-dev/quarto-cli/pull/11659)): Fix escaping bug where paths containing spaces or backslashes break server startup on Windows.
47+
4248
## Other Fixes and Improvements
4349

4450
- ([#8613](https://github.com/quarto-dev/quarto-cli/issues/8613)): Fix `giscus` color on load to support dark mode (by @kv9898).

src/execute/julia.ts

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ import {
3434
} from "../config/format.ts";
3535
import { resourcePath } from "../core/resources.ts";
3636
import { quartoRuntimeDir } from "../core/appdirs.ts";
37-
import { normalizePath } from "../core/path.ts";
37+
import { normalizePath, pathWithForwardSlashes } from "../core/path.ts";
3838
import { isInteractiveSession } from "../core/platform.ts";
3939
import { runningInCI } from "../core/ci-info.ts";
4040
import { sleep } from "../core/async.ts";
@@ -248,6 +248,12 @@ export const juliaEngine: ExecutionEngine = {
248248
},
249249
};
250250

251+
function powershell_argument_list_to_string(...args: string[]): string {
252+
// formats as '"arg 1" "arg 2" "arg 3"'
253+
const inner = args.map((arg) => `"${arg}"`).join(" ");
254+
return `'${inner}'`;
255+
}
256+
251257
async function startOrReuseJuliaServer(
252258
options: JuliaExecuteOptions,
253259
): Promise<{ reused: boolean }> {
@@ -265,6 +271,7 @@ async function startOrReuseJuliaServer(
265271
await ensureQuartoNotebookRunnerEnvironment(options);
266272
juliaProject = juliaRuntimeDir();
267273
} else {
274+
juliaProject = pathWithForwardSlashes(juliaProject);
268275
trace(
269276
options,
270277
`Custom julia project set via QUARTO_JULIA_PROJECT="${juliaProject}". Checking if QuartoNotebookRunner can be loaded.`,
@@ -310,15 +317,12 @@ async function startOrReuseJuliaServer(
310317
"Start-Process",
311318
options.julia_cmd,
312319
"-ArgumentList",
313-
// string array argument list, each element but the last must have a "," element after
314-
"--startup-file=no",
315-
",",
316-
`--project=${juliaProject}`,
317-
",",
318-
resourcePath("julia/quartonotebookrunner.jl"),
319-
",",
320-
transportFile,
321-
// end of string array
320+
powershell_argument_list_to_string(
321+
"--startup-file=no",
322+
`--project=${juliaProject}`,
323+
resourcePath("julia/quartonotebookrunner.jl"),
324+
transportFile,
325+
),
322326
"-WindowStyle",
323327
"Hidden",
324328
],

0 commit comments

Comments
 (0)