From d36743960363ecac6379e383860a8bff50cdace8 Mon Sep 17 00:00:00 2001 From: kekeimiku Date: Tue, 15 Aug 2023 07:08:56 +0800 Subject: [PATCH] check if Xcode.app is installed. --- src/instruments.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/instruments.rs b/src/instruments.rs index 7eb4efe..c0050b9 100644 --- a/src/instruments.rs +++ b/src/instruments.rs @@ -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 { @@ -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." )) }