Skip to content

Commit ba3ca69

Browse files
authored
Silence prints from Apple SDK locator scripts during gclient hooks (#840)
For flutter/flutter#145338
1 parent 2a16784 commit ba3ca69

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

build/config/ios/ios_sdk.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@ def main(argv):
8484
frameworks_symlink = os.path.join(libraries_path, 'Frameworks')
8585
symlink(frameworks_location, frameworks_symlink)
8686
sdk_output = symlink_target
87-
print(sdk_output)
87+
if not args.as_gclient_hook:
88+
print(sdk_output)
8889
return 0
8990

9091

build/mac/find_sdk.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,13 @@ def main():
101101
symlink(sdk_output, symlink_target)
102102
sdk_output = symlink_target
103103

104-
print(sdk_output)
105-
return best_sdk
104+
if not options.as_gclient_hook:
105+
print(sdk_output)
106+
print(best_sdk)
107+
return 0
106108

107109

108110
if __name__ == '__main__':
109111
if sys.platform != 'darwin':
110112
raise Exception("This script only runs on Mac")
111-
print((main()))
113+
sys.exit((main()))

0 commit comments

Comments
 (0)