machines delete: fix - delete all existing files
This commit is contained in:
parent
2a11b1c5d1
commit
a56073b051
@ -1,4 +1,5 @@
|
||||
import argparse
|
||||
import shutil
|
||||
|
||||
from ..errors import ClanError
|
||||
from .folders import machine_folder
|
||||
@ -7,7 +8,7 @@ from .folders import machine_folder
|
||||
def delete_command(args: argparse.Namespace) -> None:
|
||||
folder = machine_folder(args.host)
|
||||
if folder.exists():
|
||||
folder.rmdir()
|
||||
shutil.rmtree(folder)
|
||||
else:
|
||||
raise ClanError(f"Machine {args.host} does not exist")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user