feat: Add skip mechanism for existing tags.scm files in language download script

This commit is contained in:
Paul Gauthier (aider) 2025-03-12 13:55:47 -07:00
parent e15518dd29
commit 2d843f6e79

View file

@ -96,6 +96,12 @@ def main():
queries_dir = os.path.join(lang_dir, "queries") queries_dir = os.path.join(lang_dir, "queries")
os.makedirs(queries_dir, exist_ok=True) os.makedirs(queries_dir, exist_ok=True)
output_file = os.path.join(queries_dir, "tags.scm") output_file = os.path.join(queries_dir, "tags.scm")
# Skip if file already exists
if os.path.exists(output_file):
print(f"Skipping {lang}: tags.scm already exists")
successes += 1
continue
# Try branches in this order: # Try branches in this order:
# 1. Branch specified in the config # 1. Branch specified in the config