Do not error if the directory to be created already exists

Resolves rdar://165785860.
This commit is contained in:
Ben Barham
2025-12-04 07:42:57 +10:00
parent ca9ef8c129
commit 6a837aea6e

View File

@@ -257,7 +257,7 @@ def copy_file(source: str, destination_dir: str, verbose: bool) -> None:
"""
Copies the file at `source` into `destination_dir`.
"""
os.makedirs(destination_dir)
os.makedirs(destination_dir, exist_ok=True)
check_call(['rsync', '-a', source, destination_dir], verbose=verbose)