Skip to content

Commit

Permalink
Merge pull request #880 from t-bltg/fail-wrapper
Browse files Browse the repository at this point in the history
fix `is_juliaup_installed` for invalid path
  • Loading branch information
davidanthoff authored Sep 6, 2024
2 parents 1f45462 + bee40c2 commit 417f9ab
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/bin/juliainstaller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,10 @@ fn is_juliaup_installed() -> bool {
.stdin(Stdio::null())
.status();

exit_status.is_ok()
match exit_status {
Ok(status) => status.success(),
Err(_) => false, // failed to execute `juliaup` command
}
}

#[derive(Parser)]
Expand Down Expand Up @@ -286,7 +289,8 @@ pub fn main() -> Result<()> {

if paths.juliaupconfig.exists() {
println!("While Juliaup does not seem to be installed on this system, there is a");
println!("Juliaup configuration file present from a previous installation.");
println!("Juliaup configuration file present from a previous installation:");
println!("{}", paths.juliaupconfig.display());

if args.disable_confirmation_prompt {
println!();
Expand Down

0 comments on commit 417f9ab

Please sign in to comment.