diff --git a/src/apm_cli/deps/github_downloader.py b/src/apm_cli/deps/github_downloader.py index a71ebb22..ae82e1ed 100644 --- a/src/apm_cli/deps/github_downloader.py +++ b/src/apm_cli/deps/github_downloader.py @@ -1280,7 +1280,7 @@ def download_subdirectory_package(self, dep_ref: DependencyReference, target_pat # If target exists and has content, remove it if target_path.exists() and any(target_path.iterdir()): - shutil.rmtree(target_path) + _rmtree(target_path) target_path.mkdir(parents=True, exist_ok=True) # Copy subdirectory contents to target @@ -1409,7 +1409,7 @@ def download_package( # If directory already exists and has content, remove it if target_path.exists() and any(target_path.iterdir()): - shutil.rmtree(target_path) + _rmtree(target_path) target_path.mkdir(parents=True, exist_ok=True) # Store progress reporter so we can disable it after clone