Skip to content

Commit

Permalink
only search for Julia conda installation when the engine language is …
Browse files Browse the repository at this point in the history
…Julia
  • Loading branch information
jjallaire committed Oct 8, 2023
1 parent ab5722f commit 5fe2e9a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
1 change: 1 addition & 0 deletions news/changelog-1.4.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
14 changes: 9 additions & 5 deletions src/core/jupyter/capabilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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");
}
Expand Down

0 comments on commit 5fe2e9a

Please sign in to comment.