Make sure the fake config.gypi can be parsed by node.js.
authorCheng Zhao <zcbenz@gmail.com>
Tue, 2 Jul 2013 14:32:14 +0000 (22:32 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Tue, 2 Jul 2013 14:32:14 +0000 (22:32 +0800)
script/bootstrap.py

index 5891646..fa6797b 100755 (executable)
@@ -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():