From 0d96a72f0dd56caaea85a5f00e9a3e8edf22da20 Mon Sep 17 00:00:00 2001 From: lifansheng Date: Tue, 26 Oct 2021 17:56:14 +0800 Subject: [PATCH] Signed-off-by: lifansheng On branch master Your branch is up to date with 'origin/master'. --- convertxml/build_ts_js.py | 11 ++++++++--- uri/build_ts_js.py | 8 ++++++-- uri/src/js_uri.ts | 2 +- url/build_ts_js.py | 8 ++++++-- 4 files changed, 21 insertions(+), 8 deletions(-) diff --git a/convertxml/build_ts_js.py b/convertxml/build_ts_js.py index 4c4993e..e3c8247 100755 --- a/convertxml/build_ts_js.py +++ b/convertxml/build_ts_js.py @@ -19,8 +19,12 @@ import subprocess def run_command(cmd): print(" ".join(cmd)) - proc = subprocess.Popen(cmd) - proc.wait() + proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, + stderr=subprocess.PIPE, universal_newlines=True) + out, err = proc.communicate() + if out != "": + print(out) + exit(1) if __name__ == '__main__': @@ -42,4 +46,5 @@ node-v12.18.4-linux-x64/bin/node' run_command(cmd) cmd = ['rm', "-rf", './out'] - run_command(cmd) \ No newline at end of file + run_command(cmd) + exit(0) \ No newline at end of file diff --git a/uri/build_ts_js.py b/uri/build_ts_js.py index f4484ff..597e66c 100755 --- a/uri/build_ts_js.py +++ b/uri/build_ts_js.py @@ -21,8 +21,12 @@ import subprocess def run_command(cmd): print(" ".join(cmd)) - proc = subprocess.Popen(cmd) - proc.wait() + proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, + stderr=subprocess.PIPE, universal_newlines=True) + out, err = proc.communicate() + if out != "": + print(out) + exit(1) if __name__ == '__main__': diff --git a/uri/src/js_uri.ts b/uri/src/js_uri.ts index 2e53e1d..d5a1c0d 100644 --- a/uri/src/js_uri.ts +++ b/uri/src/js_uri.ts @@ -96,7 +96,7 @@ function toAscllString(uriStr:any) { } } -function createNewUri(uriStr:string) { +function createNewUri(uriStr : string) { return new URI(uriStr); } diff --git a/url/build_ts_js.py b/url/build_ts_js.py index 79591be..826c081 100755 --- a/url/build_ts_js.py +++ b/url/build_ts_js.py @@ -20,8 +20,12 @@ import subprocess def run_command(cmd): print(" ".join(cmd)) - proc = subprocess.Popen(cmd) - proc.wait() + proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, + stderr=subprocess.PIPE, universal_newlines=True) + out, err = proc.communicate() + if out != "": + print(out) + exit(1) if __name__ == '__main__':