]> khamidou — GitHub mirrors - electron.git/commitdiff
Verify whether the file exists before including it in zip
authorCheng Zhao <zcbenz@gmail.com>
Wed, 1 Apr 2015 02:23:17 +0000 (10:23 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Wed, 1 Apr 2015 02:23:17 +0000 (10:23 +0800)
script/create-dist.py

index 6e1c6c45fd913d7d8cc6ae9344407f15662ba2c7..a873197cf5f6ee5d78e6ef714d73b2ced4945b2c 100755 (executable)
@@ -191,7 +191,7 @@ def create_dist_zip():
   with scoped_cwd(DIST_DIR):
     files = TARGET_BINARIES[TARGET_PLATFORM] +  ['LICENSE', 'version']
     if TARGET_PLATFORM == 'linux':
-      files += SYSTEM_LIBRARIES
+      files += [lib for lib in SYSTEM_LIBRARIES if os.path.exists(lib)]
     dirs = TARGET_DIRECTORIES[TARGET_PLATFORM]
     make_zip(zip_file, files, dirs)