From 110b9236e23ccdb6a0dca62a93ce22a82bbd798c Mon Sep 17 00:00:00 2001 From: Dan Field Date: Fri, 11 Oct 2019 10:14:02 -0700 Subject: [PATCH 1/2] Print more output when gen_package fails --- tools/fuchsia/gen_package.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/tools/fuchsia/gen_package.py b/tools/fuchsia/gen_package.py index 089b730e3f832..c000a8e66513e 100755 --- a/tools/fuchsia/gen_package.py +++ b/tools/fuchsia/gen_package.py @@ -91,10 +91,20 @@ def main(): ] # Build the package - subprocess.check_call(pm_command_base + ['build']) + try: + subprocess.check_call(pm_command_base + ['build']) + except subprocess.CalledProcessError as e: + print('The "%s" command failed:' % e.cmd) + print(e.output) + raise # Archive the package - subprocess.check_call(pm_command_base + ['archive']) + try: + subprocess.check_call(pm_command_base + ['archive']) + except subprocess.CalledProcessError as e: + print('The "%s" command failed:' % e.cmd) + print(e.output) + raise return 0 From b75217fc433e11014dc42e7e92bc16c1cef94bfd Mon Sep 17 00:00:00 2001 From: Dan Field Date: Fri, 11 Oct 2019 10:15:45 -0700 Subject: [PATCH 2/2] oops --- tools/fuchsia/gen_package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/fuchsia/gen_package.py b/tools/fuchsia/gen_package.py index c000a8e66513e..f9a2685c0ef0f 100755 --- a/tools/fuchsia/gen_package.py +++ b/tools/fuchsia/gen_package.py @@ -92,7 +92,7 @@ def main(): # Build the package try: - subprocess.check_call(pm_command_base + ['build']) + output = subprocess.check_output(pm_command_base + ['build']) except subprocess.CalledProcessError as e: print('The "%s" command failed:' % e.cmd) print(e.output) @@ -100,7 +100,7 @@ def main(): # Archive the package try: - subprocess.check_call(pm_command_base + ['archive']) + output = subprocess.check_output(pm_command_base + ['archive']) except subprocess.CalledProcessError as e: print('The "%s" command failed:' % e.cmd) print(e.output)