We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 30d9cb4 commit bfe9bb5Copy full SHA for bfe9bb5
codeflash/code_utils/code_utils.py
@@ -6,6 +6,7 @@
6
from functools import lru_cache
7
from pathlib import Path
8
from tempfile import TemporaryDirectory
9
+import shutil
10
11
from codeflash.cli_cmds.console import logger
12
@@ -118,4 +119,7 @@ def has_any_async_functions(code: str) -> bool:
118
119
120
def cleanup_paths(paths: list[Path]) -> None:
121
for path in paths:
- path.unlink(missing_ok=True)
122
+ if path.is_dir():
123
+ shutil.rmtree(path, ignore_errors=True)
124
+ else:
125
+ path.unlink(missing_ok=True)
0 commit comments