Skip to content

Commit b321674

Browse files
authored
[Infra] Move --legacy flag into xcresulttool_json function (#14736)
1 parent 3636aa7 commit b321674

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

scripts/xcresult_logs.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -245,10 +245,7 @@ def export_log(xcresult_path, log_id):
245245
Returns:
246246
The logged output, as a string.
247247
"""
248-
# Note: --legacy is required for Xcode 16.
249-
contents = xcresulttool_json(
250-
'get', '--path', xcresult_path, '--id', log_id, '--legacy'
251-
)
248+
contents = xcresulttool_json('get', '--path', xcresult_path, '--id', log_id)
252249

253250
result = []
254251
collect_log_output(contents, result)
@@ -284,7 +281,8 @@ def xcresulttool(*args):
284281

285282
def xcresulttool_json(*args):
286283
"""Runs xcresulttool and its output as parsed JSON."""
287-
args = list(args) + ['--format', 'json']
284+
# Note: --legacy is required for Xcode 16.
285+
args = list(args) + ['--format', 'json', '--legacy']
288286
contents = xcresulttool(*args)
289287
return json.loads(contents)
290288

0 commit comments

Comments
 (0)