From: Cheng Zhao Date: Tue, 2 Jul 2013 14:32:14 +0000 (+0800) Subject: Make sure the fake config.gypi can be parsed by node.js. X-Git-Tag: v0.1.0~39 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=7c2a4882a68a443da2f7bc3990e88e72167c6b8e;p=electron.git Make sure the fake config.gypi can be parsed by node.js. --- diff --git a/script/bootstrap.py b/script/bootstrap.py index 58916467..fa6797bc 100755 --- a/script/bootstrap.py +++ b/script/bootstrap.py @@ -70,10 +70,10 @@ def update_win32_python(): def touch_config_gypi(): config_gypi = os.path.join(SOURCE_ROOT, 'vendor', 'node', 'config.gypi') - if not os.path.exists(config_gypi): - with open(config_gypi, 'w+') as f: - f.truncate(0) - f.write('{}') + with open(config_gypi, 'w+') as f: + content = '\n{}' + if f.read() != content: + f.write(content) def update_atom_shell():