Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check if Xcode.app is installed. #91

Merged
merged 1 commit into from
Sep 14, 2023
Merged
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
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
Loading