From 887d54bf078c24b626b7fd4e21b48ddd05710f0b Mon Sep 17 00:00:00 2001 From: daniel0alves Date: Wed, 14 Jan 2026 09:27:39 +0000 Subject: [PATCH 1/4] fix on uninstall script --- 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 380da51a7..7b6e18555 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 -- "$path" + x rm -fr "$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 -- "$path" + x rm -fr "$path" break 1 ;; n|N) From a5c61d9ab0b4412809beb37b169afbcca09f6ed3 Mon Sep 17 00:00:00 2001 From: daniel0alves Date: Wed, 14 Jan 2026 11:23:10 +0000 Subject: [PATCH 2/4] fix on uninstall script --- 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 7b6e18555..c3725fee2 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 -fr "$path" + x rm -r "$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 -fr "$path" + x rm -r "$path" break 1 ;; n|N) From 1c3c255ab670d2e5722c17dd01fc9ace6f0d4692 Mon Sep 17 00:00:00 2001 From: daniel0alves Date: Wed, 14 Jan 2026 11:26:35 +0000 Subject: [PATCH 3/4] 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) From 6afc4b1aa7dc280a45074ef34276199598c8ffa1 Mon Sep 17 00:00:00 2001 From: daniel0alves Date: Wed, 14 Jan 2026 12:30:47 +0000 Subject: [PATCH 4/4] fix on uninstall script with -r --- sdata/subcmd-uninstall/0.run.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/sdata/subcmd-uninstall/0.run.sh b/sdata/subcmd-uninstall/0.run.sh index 380da51a7..ce66cf554 100644 --- a/sdata/subcmd-uninstall/0.run.sh +++ b/sdata/subcmd-uninstall/0.run.sh @@ -45,7 +45,12 @@ function delete_targets(){ printf "${STY_YELLOW}Target \"$path\" inexists, skipping...${STY_RST}\n" continue elif [[ "$path" == "$HOME"* ]]; then - x rm -- "$path" + if [[ -d "$path" ]]; then + x rm -r -- "$path" + else + x rm -- "$path" + fi + 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 +58,11 @@ function delete_targets(){ echo case "$ans" in y|Y) - x rm -- "$path" + if [[ -d "$path" ]]; then + x rm -r -- "$path" + else + x rm -- "$path" + fi break 1 ;; n|N)