Skip to content

Commit

Permalink
Merge pull request #1029 from christiangnrd/valid-paths
Browse files Browse the repository at this point in the history
Check if path points to valid julia binary
  • Loading branch information
davidanthoff authored Sep 3, 2024
2 parents 2cb1989 + 41a20d7 commit 137cd53
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,14 @@ pub fn get_bin_dir() -> Result<PathBuf> {
Ok(path)
}

pub fn is_valid_julia_path(julia_path: &PathBuf) -> bool {
return std::process::Command::new(julia_path)
.arg("-v")
.stdout(std::process::Stdio::null())
.spawn()
.is_ok();
}

pub fn get_arch() -> Result<String> {
if std::env::consts::ARCH == "x86" {
return Ok("x86".to_string());
Expand Down

0 comments on commit 137cd53

Please sign in to comment.