Fix failing CI on OS X

This commit is contained in:
Cheng Zhao 2016-05-14 23:11:13 +09:00
parent d3e359ab2d
commit 3214fdd73f

View file

@ -52,9 +52,6 @@ def main():
if PLATFORM != 'win32':
# Download prebuilt clang binaries.
update_clang()
if not args.disable_clang and args.clang_dir == '':
# Build with prebuilt clang.
set_clang_env(os.environ)
setup_python_libs()
update_node_modules('.')
@ -67,7 +64,7 @@ def main():
create_chrome_version_h()
touch_config_gypi()
run_update(defines)
run_update(defines, args.disable_clang, args.clang_dir)
update_electron_modules('spec', args.target_arch)
@ -250,9 +247,14 @@ def touch_config_gypi():
f.write(content)
def run_update(defines):
def run_update(defines, disable_clang, clang_dir):
env = os.environ.copy()
if not disable_clang and clang_dir == '':
# Build with prebuilt clang.
set_clang_env(env)
update = os.path.join(SOURCE_ROOT, 'script', 'update.py')
execute_stdout([sys.executable, update, '--defines', defines])
execute_stdout([sys.executable, update, '--defines', defines], env)
if __name__ == '__main__':