Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ windows = { version = "0.58.0", features = ["Win32_Foundation", "Win32_UI_Shell"

[target.'cfg(target_os = "macos")'.dependencies]
reqwest = { version = "0.12", default-features = false, features = ["blocking", "native-tls", "socks"] }
walkdir = "2.5"

[target.'cfg(all(not(target_os = "macos"),not(windows)))'.dependencies]
reqwest = { version = "0.12", default-features = false, features = ["blocking", "rustls-tls-native-roots", "socks"] }
Expand Down
19 changes: 19 additions & 0 deletions src/operations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -580,6 +580,25 @@ pub fn install_from_url(
}
};

#[cfg(target_os = "macos")]
{
use std::os::unix::fs::PermissionsExt;

// TODO Add prompt that asks users to confirm this
eprintln!("Code signing");
for entry in walkdir::WalkDir::new(temp_dir.path()).into_iter().filter_map(|e| e.ok()) {
// TODO Instead of comparing > 0 we need to change this to check for the right permissions on exectuable files and only
// sign those
if entry.metadata()?.is_file() && entry.metadata()?.permissions().mode() > 0 {
std::process::Command::new("codesign")
.arg("--sign")
.arg("-")
.arg(entry.path())
.status()?;
}
}
}

// Query the actual version
let julia_path = temp_dir
.path()
Expand Down
Loading