Skip to content

Commit

Permalink
Available SDKs Should Return the Empty List if Xcode is Not Installed
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=259514
rdar://112870698

Reviewed by Alexey Proskuryakov.

If Xcode is not installed, webkitpy’s PlatformInfo#available_sdks method should return the empty list.

* Tools/Scripts/webkitpy/common/system/platforminfo.py:
(PlatformInfo.available_sdks):

Canonical link: https://commits.webkit.org/266325@main
  • Loading branch information
chgibb-apple committed Jul 26, 2023
1 parent 8b0667f commit dff1c2a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Tools/Scripts/webkitpy/common/system/platforminfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,13 @@ def available_sdks(self):
return []

XCODE_SDK_REGEX = re.compile(r'\-sdk (?P<sdk>\D+)\d+\.\d+(?P<specifier>\D*)')
output = self._executive.run_command(['xcodebuild', '-showsdks'], return_stderr=False)

output = ''

try:
output = self._executive.run_command(['xcodebuild', '-showsdks'], return_stderr=False)
except ScriptError:
return []

sdks = list()
for line in output.splitlines():
Expand Down

0 comments on commit dff1c2a

Please sign in to comment.