From ef2c2ccdc258966684c44a82482f0e5d62bd7d84 Mon Sep 17 00:00:00 2001 From: chenqy930 Date: Fri, 31 Mar 2023 11:35:40 +0800 Subject: [PATCH] Print error message when gen abc failed Signed-off-by: chenqy930 Change-Id: I56e9a2d6f641594af2ab67d823d3daa8574c5182 --- es2panda/scripts/generate_js_bytecode.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/es2panda/scripts/generate_js_bytecode.py b/es2panda/scripts/generate_js_bytecode.py index 6b49bf2adf7..2cb17d2d37f 100755 --- a/es2panda/scripts/generate_js_bytecode.py +++ b/es2panda/scripts/generate_js_bytecode.py @@ -50,9 +50,13 @@ def parse_args(): return arguments def run_command(cmd, execution_path): - print(" ".join(cmd) + " | execution_path: " + execution_path) proc = subprocess.Popen(cmd, cwd=execution_path) - proc.wait() + stdout, stderr = proc.communicate() + if stderr: + print("Gen abc failed") + print(" ".join(cmd) + " | execution_path: " + execution_path) + print(stderr) + exit(1) def gen_abc_info(input_arguments): -- Gitee