Skip to content

Commit

Permalink
fix: Prevent 'directory not empty' error in snowfakery on Linux (#3864
Browse files Browse the repository at this point in the history
)

Implemented potential fix to address Linux issue on #3859. Please advise
if any changes are requested.

---------

Co-authored-by: James Estevez <[email protected]>
Co-authored-by: James Estevez <[email protected]>
Co-authored-by: Bharath Chadarajupalli <[email protected]>
  • Loading branch information
4 people authored Jan 17, 2025
1 parent 53f807b commit 1d90c46
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cumulusci/tasks/bulkdata/snowfakery.py
Original file line number Diff line number Diff line change
Expand Up @@ -583,8 +583,10 @@ def _generate_and_load_initial_batch(self, working_directory: Path):
self.sets_finished_while_generating_template = num_records

new_template_dir = data_loader_new_directory_name(template_dir, self.run_until)
shutil.move(template_dir, new_template_dir)
template_dir = new_template_dir
# rename only if new_template_dir does not match template_dir
if template_dir.resolve() != new_template_dir.resolve():
shutil.move(template_dir, new_template_dir)
template_dir = new_template_dir

# don't send data tables to child processes. All they
# care about are ID->OID mappings
Expand Down

0 comments on commit 1d90c46

Please sign in to comment.