aboutsummaryrefslogtreecommitdiff
path: root/www/deno/files/patch-cli_tools_jupyter_install.rs
diff options
context:
space:
mode:
Diffstat (limited to 'www/deno/files/patch-cli_tools_jupyter_install.rs')
-rw-r--r--www/deno/files/patch-cli_tools_jupyter_install.rs25
1 files changed, 20 insertions, 5 deletions
diff --git a/www/deno/files/patch-cli_tools_jupyter_install.rs b/www/deno/files/patch-cli_tools_jupyter_install.rs
index ab54a03e9f00..bbc6e132aa95 100644
--- a/www/deno/files/patch-cli_tools_jupyter_install.rs
+++ b/www/deno/files/patch-cli_tools_jupyter_install.rs
@@ -1,12 +1,27 @@
Index: cli/tools/jupyter/install.rs
--- cli/tools/jupyter/install.rs.orig
+++ cli/tools/jupyter/install.rs
-@@ -51,7 +51,7 @@ pub fn install() -> Result<(), AnyError> {
+@@ -1,6 +1,5 @@
+ // Copyright 2018-2025 the Deno authors. MIT license.
+
+-use std::env::current_exe;
+ use std::io::Write;
+ use std::path::Path;
+ use std::path::PathBuf;
+@@ -89,15 +88,11 @@ pub fn install(
+ }
+
+ let display_name = maybe_display_name.unwrap_or("Deno");
+- let current_exe_path = current_exe()
+- .context("Failed to get current executable path")?
+- .to_string_lossy()
+- .into_owned();
+
+ // TODO(bartlomieju): add remaining fields as per
// https://jupyter-client.readthedocs.io/en/stable/kernels.html#kernel-specs
- // FIXME(bartlomieju): replace `current_exe` before landing?
let json_data = json!({
-- "argv": [current_exe().unwrap().to_string_lossy(), "jupyter", "--kernel", "--conn", "{connection_file}"],
-+ "argv": ["LOCALBASE/bin/deno", "jupyter", "--kernel", "--conn", "{connection_file}"],
- "display_name": "Deno",
+- "argv": [current_exe_path, "jupyter", "--kernel", "--conn", "{connection_file}"],
++ "argv": ["PREFIX/bin/deno", "jupyter", "--kernel", "--conn", "{connection_file}"],
+ "display_name": display_name,
"language": "typescript",
});