mirror of
https://github.com/dw-0/kiauh.git
synced 2025-12-25 08:43:36 +05:00
fix: add recursive removal of files
Signed-off-by: Dominik Willner <th33xitus@gmail.com>
This commit is contained in:
@@ -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}")
|
||||||
|
|||||||
Reference in New Issue
Block a user