Skip to content

Commit

Permalink
dont fail if output dir exists
Browse files Browse the repository at this point in the history
  • Loading branch information
asmacdo committed Dec 16, 2024
1 parent c881287 commit a3505f9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/scripts/create-file-index.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,13 @@ def directory_index(directory):

directory = sys.argv[1]

# Ensure the output filename ends with .tsv for clarity

os.makedirs(OUTPUT_DIR)
os.makedirs(OUTPUT_DIR, exist_ok=True)
output_file = f"{OUTPUT_DIR}/{directory}-index.tsv"

file_index = MetadataWriter(output_file)
file_index.start()

for filename, size, created, modified, error in directory_index(directory):
file_index.write_row(filename, size, created, modified, error)

file_index.finish()

0 comments on commit a3505f9

Please sign in to comment.