Ignore npm install errors when running in CI
This commit is contained in:
parent
cab1b75c41
commit
33109a2718
1 changed files with 10 additions and 2 deletions
|
@ -99,16 +99,24 @@ def update_node_modules(dirname, env=None):
|
||||||
if env is None:
|
if env is None:
|
||||||
env = os.environ
|
env = os.environ
|
||||||
if PLATFORM == 'linux':
|
if PLATFORM == 'linux':
|
||||||
|
# Use prebuilt clang for building native modules.
|
||||||
llvm_dir = os.path.join(SOURCE_ROOT, 'vendor', 'llvm-build',
|
llvm_dir = os.path.join(SOURCE_ROOT, 'vendor', 'llvm-build',
|
||||||
'Release+Asserts', 'bin')
|
'Release+Asserts', 'bin')
|
||||||
env['CC'] = os.path.join(llvm_dir, 'clang')
|
env['CC'] = os.path.join(llvm_dir, 'clang')
|
||||||
env['CXX'] = os.path.join(llvm_dir, 'clang++')
|
env['CXX'] = os.path.join(llvm_dir, 'clang++')
|
||||||
env['npm_config_clang'] = '1'
|
env['npm_config_clang'] = '1'
|
||||||
with scoped_cwd(dirname):
|
with scoped_cwd(dirname):
|
||||||
|
args = [NPM, 'install']
|
||||||
if is_verbose_mode():
|
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:
|
else:
|
||||||
execute_stdout([NPM, 'install'], env)
|
execute_stdout(args, env)
|
||||||
|
|
||||||
|
|
||||||
def update_electron_modules(dirname, target_arch):
|
def update_electron_modules(dirname, target_arch):
|
||||||
|
|
Loading…
Reference in a new issue