From: IgorKlopov Date: Sun, 7 Dec 2014 23:42:55 +0000 (+0300) Subject: introduce execute_stdout X-Git-Tag: v0.20.0~6^2~7 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=a5e1d8c97f8ff0662254c9c10ebf927e0c5a5a52;p=electron.git 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) --- diff --git a/script/lib/util.py b/script/lib/util.py index 9734005d..852d2af1 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()