SecBSD's official ports repository
This commit is contained in:
commit
2c0afcbbf3
64331 changed files with 5339189 additions and 0 deletions
21
lang/deno/patches/patch-cli_standalone_binary_rs
Normal file
21
lang/deno/patches/patch-cli_standalone_binary_rs
Normal file
|
@ -0,0 +1,21 @@
|
|||
Index: cli/standalone/binary.rs
|
||||
--- cli/standalone/binary.rs.orig
|
||||
+++ cli/standalone/binary.rs
|
||||
@@ -143,7 +143,8 @@ pub struct Metadata {
|
||||
}
|
||||
|
||||
pub fn load_npm_vfs(root_dir_path: PathBuf) -> Result<FileBackedVfs, AnyError> {
|
||||
- let file_path = current_exe().unwrap();
|
||||
+ let file_path =
|
||||
+ current_exe().unwrap_or(PathBuf::from("${LOCALBASE}/bin/deno"));
|
||||
let mut file = std::fs::File::open(file_path)?;
|
||||
file.seek(SeekFrom::End(-(TRAILER_SIZE as i64)))?;
|
||||
let mut trailer = [0; TRAILER_SIZE];
|
||||
@@ -403,7 +404,7 @@
|
||||
target: Option<String>,
|
||||
) -> Result<Vec<u8>, AnyError> {
|
||||
if target.is_none() {
|
||||
- let path = std::env::current_exe()?;
|
||||
+ let path = PathBuf::from("${LOCALBASE}/bin/deno");
|
||||
return Ok(std::fs::read(path)?);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue