diff --git a/setupbase.py b/setupbase.py index 5c95ce32d..6abd33625 100644 --- a/setupbase.py +++ b/setupbase.py @@ -22,7 +22,7 @@ from distutils.cmd import Command from fnmatch import fnmatch from glob import glob from multiprocessing.pool import ThreadPool -from subprocess import check_call +from subprocess import check_call, check_output if sys.platform == 'win32': from subprocess import list2cmdline @@ -346,7 +346,12 @@ class Bower(Command): if self.should_run_npm(): print("installing build dependencies with npm") + npm_progress = check_output(['npm','get','progress']).decode().strip() + if npm_progress not in {'true', 'false'}: + raise ValueError('npm progress setting should be either `true `of `false` but %s was found.' % npm_progress) + run(['npm','set','progress=false']) run(['npm', 'install'], cwd=repo_root) + run(['npm','set','progress=%s'%npm_progress]) os.utime(self.node_modules, None) env = os.environ.copy()