fix(local-env): replace os.rmdir with shutil.rmtree for directory removal

This commit is contained in:
Harry 2026-01-27 15:13:55 +08:00
parent a29f569e08
commit 394a811e5e
1 changed files with 2 additions and 1 deletions

View File

@ -1,5 +1,6 @@
import os
import pathlib
import shutil
import subprocess
from collections.abc import Mapping, Sequence
from functools import cached_property
@ -106,7 +107,7 @@ class LocalVirtualEnvironment(VirtualEnvironment):
"""
working_path = self.get_working_path()
if os.path.exists(working_path):
os.rmdir(working_path)
shutil.rmtree(working_path)
def upload_file(self, path: str, content: BytesIO) -> None:
"""