fix: add recursive removal of files

Signed-off-by: Dominik Willner <th33xitus@gmail.com>
This commit is contained in:
dw-0
2024-06-27 20:58:33 +02:00
parent 4df89c9917
commit e06a4e3197

View File

@@ -59,9 +59,9 @@ def create_symlink(source: Path, target: Path, sudo=False) -> None:
raise raise
def remove_with_sudo(file_path: Path) -> None: def remove_with_sudo(file: Path) -> None:
try: try:
cmd = ["sudo", "rm", "-f", file_path] cmd = ["sudo", "rm", "-rf", file]
run(cmd, stderr=PIPE, check=True) run(cmd, stderr=PIPE, check=True)
except CalledProcessError as e: except CalledProcessError as e:
Logger.print_error(f"Failed to remove file: {e}") Logger.print_error(f"Failed to remove file: {e}")