From a5e1d8c97f8ff0662254c9c10ebf927e0c5a5a52 Mon Sep 17 00:00:00 2001 From: IgorKlopov Date: Mon, 8 Dec 2014 02:42:55 +0300 Subject: [PATCH] introduce execute_stdout `execute_stdout` does not return the output of the process. Instead it outputs directly to current stdout (in real-time - to see what is `npm` doing now) --- script/lib/util.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/script/lib/util.py b/script/lib/util.py index 9734005ddb14..852d2af194cc 100644 --- a/script/lib/util.py +++ b/script/lib/util.py @@ -144,6 +144,18 @@ def execute(argv): raise e +def execute_stdout(argv): + if verbose_mode: + print ' '.join(argv) + try: + subprocess.check_call(argv) + except subprocess.CalledProcessError as e: + print e.output + raise e + else: + return execute(argv) + + def get_atom_shell_version(): return subprocess.check_output(['git', 'describe', '--tags']).strip()