Simplify how to pass noprogress

This commit is contained in:
Matthias Bussonnier 2016-01-26 15:10:37 -08:00
parent 8339f40ca2
commit 3f921ff4d9

View File

@ -346,12 +346,7 @@ class Bower(Command):
if self.should_run_npm(): if self.should_run_npm():
print("installing build dependencies with npm") print("installing build dependencies with npm")
npm_progress = check_output(['npm','get','progress']).decode().strip() run(['npm', 'install','--progress=false'], cwd=repo_root)
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) os.utime(self.node_modules, None)
env = os.environ.copy() env = os.environ.copy()