Skip to content

Commit 049b4b8

Browse files
committed
Revert to default path if xcode-select failed
1 parent 2778c29 commit 049b4b8

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

compile_database.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,12 @@
2323
def getXcodeBasePath():
2424
global XCODE_BASE_PATH
2525
if XCODE_BASE_PATH is None:
26-
XCODE_BASE_PATH = subprocess.check_output(
27-
["xcode-select", "-p"]
28-
).rstrip().decode('utf8')
26+
try:
27+
XCODE_BASE_PATH = subprocess.check_output(
28+
["xcode-select", "-p"]
29+
).rstrip().decode('utf8')
30+
except subprocess.CalledProcessError:
31+
XCODE_BASE_PATH = '/Applications/Xcode.app/Contents/Developer'
2932
return XCODE_BASE_PATH
3033

3134

0 commit comments

Comments
 (0)