Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 13 additions & 7 deletions .generator/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -413,13 +413,19 @@ def _copy_files_needed_for_post_processing(
destination_dir = f"{output}/{path_to_library}"

if Path(source_dir).exists():
shutil.copytree(
source_dir,
destination_dir,
dirs_exist_ok=True,
)
# Apply headers only to the generator-input files copied above.
_add_header_to_files(destination_dir)
with tempfile.TemporaryDirectory() as tmp_dir:
shutil.copytree(
source_dir,
tmp_dir,
dirs_exist_ok=True,
)
# Apply headers only to the generator-input files copied above.
_add_header_to_files(tmp_dir)
shutil.copytree(
tmp_dir,
destination_dir,
dirs_exist_ok=True,
)

# We need to create these directories so that we can copy files necessary for post-processing.
os.makedirs(
Expand Down
Loading