From 5fe2e9ae0743fd2df57129ff749e01017f1ada94 Mon Sep 17 00:00:00 2001 From: "J.J. Allaire" Date: Sun, 8 Oct 2023 16:28:55 -0400 Subject: [PATCH] only search for Julia conda installation when the engine language is Julia --- news/changelog-1.4.md | 1 + src/core/jupyter/capabilities.ts | 14 +++++++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/news/changelog-1.4.md b/news/changelog-1.4.md index 5dfeeaeaa6..da132236e4 100644 --- a/news/changelog-1.4.md +++ b/news/changelog-1.4.md @@ -144,6 +144,7 @@ - ([#6344](https://github.com/quarto-dev/quarto-cli/issues/6344)): Somewhat improve the error message in case of YAML parsing errors in metadata of Python code cells. - ([#6367](https://github.com/quarto-dev/quarto-cli/issues/6367)): Fix bug with nested code cells in the generation of Jupyter notebook from .qmd files. - ([#6393](https://github.com/quarto-dev/quarto-cli/pull/6393)): Search `JULIA_HOME` for Julia-specific Python installations. +- Only search for Julia conda installation when the engine language is Julia ## Knitr diff --git a/src/core/jupyter/capabilities.ts b/src/core/jupyter/capabilities.ts index 92f53e7cdd..772aa068f8 100644 --- a/src/core/jupyter/capabilities.ts +++ b/src/core/jupyter/capabilities.ts @@ -25,10 +25,12 @@ export async function jupyterCapabilities(kernelspec?: JupyterKernelspec) { if (!jupyterCapsCache.has(language)) { // if we are targeting julia then prefer the julia installed miniconda - const juliaCaps = await getVerifiedJuliaCondaJupyterCapabilities(); - if (language === "julia" && juliaCaps) { - jupyterCapsCache.set(language, juliaCaps); - return juliaCaps; + if (language === "julia") { + const juliaCaps = await getVerifiedJuliaCondaJupyterCapabilities(); + if (juliaCaps) { + jupyterCapsCache.set(language, juliaCaps); + return juliaCaps; + } } // if there is an explicit python requested then use it @@ -79,7 +81,9 @@ const S_IXUSR = 0o100; async function getVerifiedJuliaCondaJupyterCapabilities() { let juliaHome = Deno.env.get("JULIA_HOME"); if (!juliaHome) { - const home = isWindows() ? Deno.env.get("USERPROFILE") : Deno.env.get("HOME"); + const home = isWindows() + ? Deno.env.get("USERPROFILE") + : Deno.env.get("HOME"); if (home) { juliaHome = join(home, ".julia"); }