diff --git a/engine/src/flutter/impeller/tools/build_metal_library.py b/engine/src/flutter/impeller/tools/build_metal_library.py index 76ff59d1e3a..52865e95506 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())