From: Cheng Zhao Date: Fri, 3 Jul 2015 01:43:09 +0000 (+0800) Subject: Ignore npm install errors when running in CI X-Git-Tag: v0.29.0~2^2~8 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=33109a27182a393f25beef3690dbf0c479113dc0;p=electron.git Ignore npm install errors when running in CI --- diff --git a/script/bootstrap.py b/script/bootstrap.py index 36719ccb..60b7a83a 100755 --- a/script/bootstrap.py +++ b/script/bootstrap.py @@ -99,16 +99,24 @@ def update_node_modules(dirname, env=None): if env is None: env = os.environ if PLATFORM == 'linux': + # Use prebuilt clang for building native modules. llvm_dir = os.path.join(SOURCE_ROOT, 'vendor', 'llvm-build', 'Release+Asserts', 'bin') env['CC'] = os.path.join(llvm_dir, 'clang') env['CXX'] = os.path.join(llvm_dir, 'clang++') env['npm_config_clang'] = '1' with scoped_cwd(dirname): + args = [NPM, 'install'] if is_verbose_mode(): - execute_stdout([NPM, 'install', '--verbose'], env) + args += '--verbose' + # Ignore npm install errors when running in CI. + if os.environ.has_key('CI'): + try: + execute_stdout(args, env) + except: + pass else: - execute_stdout([NPM, 'install'], env) + execute_stdout(args, env) def update_electron_modules(dirname, target_arch):