Skip to content

Commit

Permalink
check if Xcode.app is installed.
Browse files Browse the repository at this point in the history
  • Loading branch information
kekeimiku authored and cmyr committed Sep 14, 2023
1 parent a186327 commit 23faeab
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/instruments.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ impl XcodeInstruments {
// This is the check used by Homebrew,see
// https://github.com/Homebrew/install/blob/a1d820fc8950312c35073700d0ea88a531bc5950/install.sh#L216
let clt_git_filepath = Path::new("/Library/Developer/CommandLineTools/usr/bin/git");
if clt_git_filepath.exists() {
let xcode_git_filepath =
Path::new("/Applications/Xcode.app/Contents/Developer/usr/bin/git");
if clt_git_filepath.exists() || xcode_git_filepath.exists() {
return Ok(XcodeInstruments::XcTrace);
}
} else {
Expand All @@ -43,7 +45,7 @@ impl XcodeInstruments {
}
}
Err(anyhow!(
"Xcode Instruments is not installed. Please install the Xcode Command Line Tools."
"Xcode Instruments is not installed. Please install the Xcode.app or Xcode Command Line Tools."
))
}

Expand Down

0 comments on commit 23faeab

Please sign in to comment.