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

+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
}