]> khamidou — GitHub mirrors - electron.git/commitdiff
One more `verbose_mode`
authorIgorKlopov <igor@klopov.com>
Sun, 7 Dec 2014 23:52:13 +0000 (02:52 +0300)
committerIgorKlopov <igor@klopov.com>
Sun, 7 Dec 2014 23:52:13 +0000 (02:52 +0300)
`bootstrap.py` new variable `verbose_mode` to run `npm install` with --verbose option

script/bootstrap.py

index 9a95b1e02aa199f23c507afa8d7981234dbb5b31..018599092b191a68d98ffbf310aae8df11dde9a0 100755 (executable)
@@ -14,12 +14,17 @@ PYTHON_26_URL = 'https://chromium.googlesource.com/chromium/deps/python_26'
 NPM = 'npm.cmd' if sys.platform in ['win32', 'cygwin'] else 'npm'
 
 
+verbose_mode = False
+
+
 def main():
   os.chdir(SOURCE_ROOT)
 
   args = parse_args()
   if args.verbose:
     enable_verbose_execute()
+    global verbose_mode
+    verbose_mode = True
   update_submodules()
   update_node_modules('.')
   update_atom_modules('spec')
@@ -61,7 +66,10 @@ def bootstrap_brightray(url):
 
 def update_node_modules(dirname):
   with scoped_cwd(dirname):
-    execute_stdout([NPM, 'install'])
+    if verbose_mode:
+      execute_stdout([NPM, 'install', '--verbose'])
+    else:
+      execute_stdout([NPM, 'install'])
 
 
 def update_atom_modules(dirname):