Handle rm failure in uninstall

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

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
}