From cee6a53fc698bf64eb39b276083db283683a3a39 Mon Sep 17 00:00:00 2001 From: "CanbiZ (MickLesk)" <47820557+MickLesk@users.noreply.github.com> Date: Thu, 19 Mar 2026 17:45:10 +0100 Subject: [PATCH] Display pin reason in release-check messages Add an optional pin_reason parameter to check_for_gh_release and check_for_codeberg_release and update the no-update messaging to show the provided reason. If no reason is supplied, show a default message indicating the update is temporarily held back due to issues with newer releases. This improves user feedback when versions are intentionally pinned. --- misc/tools.func | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/misc/tools.func b/misc/tools.func index af2d21435..c8f679a32 100644 --- a/misc/tools.func +++ b/misc/tools.func @@ -2271,6 +2271,7 @@ check_for_gh_release() { local app="$1" local source="$2" local pinned_version_in="${3:-}" # optional + local pin_reason="${4:-}" # optional reason shown to user local app_lc="" app_lc="$(echo "${app,,}" | tr -d ' ')" local current_file="$HOME/.${app_lc}" @@ -2444,7 +2445,11 @@ check_for_gh_release() { return 0 fi - msg_ok "No update available: ${app} is already on pinned version (${current})" + if [[ -n "$pin_reason" ]]; then + msg_ok "No update available: ${app} (${current}) - update held back: ${pin_reason}" + else + msg_ok "No update available: ${app} (${current}) - update temporarily held back due to issues with newer releases" + fi return 1 fi @@ -2483,6 +2488,7 @@ check_for_codeberg_release() { local app="$1" local source="$2" local pinned_version_in="${3:-}" # optional + local pin_reason="${4:-}" # optional reason shown to user local app_lc="${app,,}" local current_file="$HOME/.${app_lc}" @@ -2562,7 +2568,11 @@ check_for_codeberg_release() { return 0 fi - msg_ok "No update available: ${app} is already on pinned version (${current})" + if [[ -n "$pin_reason" ]]; then + msg_ok "No update available: ${app} (${current}) - update held back: ${pin_reason}" + else + msg_ok "No update available: ${app} (${current}) - update temporarily held back due to issues with newer releases" + fi return 1 fi