From d2b6e2e0a6fc643e0d6f2fc59cc5a09deedbcf1e Mon Sep 17 00:00:00 2001 From: Dan Field Date: Mon, 27 Feb 2023 15:39:06 -0800 Subject: [PATCH] Actually print out if xcrun metal fails (flutter/engine#39926) Actually print out if xcrun metal fails --- .../src/flutter/impeller/tools/build_metal_library.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/engine/src/flutter/impeller/tools/build_metal_library.py b/engine/src/flutter/impeller/tools/build_metal_library.py index 76ff59d1e3..52865e9550 100644 --- a/engine/src/flutter/impeller/tools/build_metal_library.py +++ b/engine/src/flutter/impeller/tools/build_metal_library.py @@ -111,10 +111,16 @@ def main(): command += args.source - subprocess.check_output(command, stderr=subprocess.STDOUT) + try: + subprocess.check_output(command, stderr=subprocess.STDOUT, text=True) + except subprocess.CalledProcessError as cpe: + print(cpe.output) + return cpe.returncode + + return 0 if __name__ == '__main__': if sys.platform != 'darwin': raise Exception('This script only runs on Mac') - main() + sys.exit(main())