Handle rm failure in uninstall

This commit is contained in:
thePR0M3TH3AN committed 2025-07-11 10:41:33 -04:00
1 parent 8a70b65e02
commit 8d64a94d83
3 files changed
+10 -1

No files matched your search

+1
View File
@@ -99,6 +99,7 @@ Run the matching uninstaller if you need to remove a previous installation or cl
```bash
bash -c "$(curl -sSL https://raw.githubusercontent.com/PR0M3TH3AN/SeedPass/main/scripts/uninstall.sh)"
```
If you see a warning that an old executable couldn't be removed, delete the file manually.
**Windows (PowerShell):**
```powershell
+1
View File
@@ -102,6 +102,7 @@ Run the matching uninstaller if you need to remove a previous installation or cl
```bash
bash -c "$(curl -sSL https://raw.githubusercontent.com/PR0M3TH3AN/SeedPass/main/scripts/uninstall.sh)"
```
If the script warns that it couldn't remove an executable, delete that file manually.
**Windows (PowerShell):**
```powershell
+8 -1
View File
@@ -22,7 +22,14 @@ remove_stale_executables() {
candidate="$dir/seedpass"
if [ -f "$candidate" ] && [ "$candidate" != "$LAUNCHER_PATH" ]; then
print_info "Removing old executable '$candidate'..."
rm -f "$candidate" || true
if rm -f "$candidate"; then
rm_status=0
else
rm_status=$?
fi
if [ $rm_status -ne 0 ] && [ -f "$candidate" ]; then
print_warning "Failed to remove $candidate – try deleting it manually"
fi
fi
done
}