21 lines
809 B
Text
21 lines
809 B
Text
Index: cli/standalone/mod.rs
|
|
--- cli/standalone/mod.rs.orig
|
|
+++ cli/standalone/mod.rs
|
|
@@ -49,6 +49,7 @@ use deno_runtime::permissions::PermissionsContainer;
|
|
use deno_runtime::WorkerLogLevel;
|
|
use deno_semver::npm::NpmPackageReqReference;
|
|
use import_map::parse_from_json;
|
|
+use std::path::PathBuf;
|
|
use std::pin::Pin;
|
|
use std::rc::Rc;
|
|
use std::sync::Arc;
|
|
@@ -287,7 +288,8 @@ pub async fn run(
|
|
metadata: Metadata,
|
|
) -> Result<(), AnyError> {
|
|
let main_module = &metadata.entrypoint;
|
|
- let current_exe_path = std::env::current_exe().unwrap();
|
|
+ let current_exe_path =
|
|
+ std::env::current_exe().unwrap_or(PathBuf::from("${LOCALBASE}/bin/deno"));
|
|
let current_exe_name =
|
|
current_exe_path.file_name().unwrap().to_string_lossy();
|
|
let deno_dir_provider = Arc::new(DenoDirProvider::new(None));
|