From 1c3c255ab670d2e5722c17dd01fc9ace6f0d4692 Mon Sep 17 00:00:00 2001 From: daniel0alves Date: Wed, 14 Jan 2026 11:26:35 +0000 Subject: [PATCH] Change rm command to use -- option for safety --- sdata/subcmd-uninstall/0.run.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdata/subcmd-uninstall/0.run.sh b/sdata/subcmd-uninstall/0.run.sh index c3725fee2..380da51a7 100644 --- a/sdata/subcmd-uninstall/0.run.sh +++ b/sdata/subcmd-uninstall/0.run.sh @@ -45,7 +45,7 @@ function delete_targets(){ printf "${STY_YELLOW}Target \"$path\" inexists, skipping...${STY_RST}\n" continue elif [[ "$path" == "$HOME"* ]]; then - x rm -r "$path" + x rm -- "$path" else while true; do printf "WARNING: Target \"$path\" is not under \$HOME. Still delete it?\ny=Yes, delete it;\nn=No, skip this one\n" @@ -53,7 +53,7 @@ function delete_targets(){ echo case "$ans" in y|Y) - x rm -r "$path" + x rm -- "$path" break 1 ;; n|N)