Browse Source

build: fix missing patch config dir error (#35451)

Shelley Vohr 2 years ago
parent
commit
8128fa6d85
1 changed files with 3 additions and 1 deletions
  1. 3 1
      script/export_all_patches.py

+ 3 - 1
script/export_all_patches.py

@@ -2,13 +2,15 @@
 
 import argparse
 import json
+import os
 
 from lib import git
 
 
 def export_patches(dirs, dry_run):
   for patch_dir, repo in dirs.items():
-    git.export_patches(repo=repo, out_dir=patch_dir, dry_run=dry_run)
+    if os.path.exists(repo):
+      git.export_patches(repo=repo, out_dir=patch_dir, dry_run=dry_run)
 
 
 def parse_args():