From 1236984f9f959b894f385753f543181f38767a0b Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Mon, 10 Jul 2023 16:50:12 -0400 Subject: [PATCH] Print framework log when framework build fails for darwin-frawework-tool. (#27862) --- scripts/build/build_darwin_framework.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scripts/build/build_darwin_framework.py b/scripts/build/build_darwin_framework.py index edb854d7d173ab..6bd44ec5502128 100644 --- a/scripts/build/build_darwin_framework.py +++ b/scripts/build/build_darwin_framework.py @@ -45,6 +45,15 @@ def run_command(command): with open(args.log_path, "wb") as f: f.write(command_log) + + if returncode != 0: + # command_log is binary, so decoding as utf-8 might technically fail. We don't want + # to throw on that. + try: + print("Failure log: {}".format(command_log.decode())) + except Exception: + pass + return returncode