We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0827bf4 commit fd3aad7Copy full SHA for fd3aad7
2 files changed
src/cocoindex_code/cli.py
@@ -392,11 +392,7 @@ def reset(
392
_typer.echo("Aborted.")
393
raise _typer.Exit(code=0)
394
395
- # Delete files
396
- for f in to_delete:
397
- f.unlink(missing_ok=True)
398
-
399
- # Remove project from daemon (without auto-starting)
+ # Remove project from daemon first so it releases file handles
400
try:
401
from .client import DaemonClient
402
@@ -407,6 +403,15 @@ def reset(
407
403
except (ConnectionRefusedError, OSError, RuntimeError):
408
404
pass # Daemon not running — that's fine
409
405
406
+ # Delete files/directories
+ import shutil as _shutil
+
+ for f in to_delete:
410
+ if f.is_dir():
411
+ _shutil.rmtree(f)
412
+ else:
413
+ f.unlink(missing_ok=True)
414
415
if all_:
416
# Remove .cocoindex_code/ if empty
417
0 commit comments