From 4b721f30be6998645c8cfa434e7b289211937fd5 Mon Sep 17 00:00:00 2001 From: William Villeneuve Date: Sun, 27 Oct 2024 20:39:36 -0400 Subject: [PATCH] brew: fixed manual installer packages --- brew/brew.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/brew/brew.sh b/brew/brew.sh index 395d315..9119f76 100755 --- a/brew/brew.sh +++ b/brew/brew.sh @@ -11,6 +11,7 @@ brew::_provision_package() { declare installed_version declare latest_version declare package_info + declare manual_installer package_info="$( jq \ --arg 'name' "$package" \ @@ -29,6 +30,7 @@ brew::_provision_package() { installed_version="$(jq -r '.installed // empty' <<<"$package_info")" || return "$?" latest_version="$(jq -r '.version // empty' <<<"$package_info")" || return "$?" outdated="$(jq -r '.outdated // empty' <<<"$package_info")" || return "$?" + manual_installer="$(jq -r '.artifacts[].installer | select(. != null) | .[].manual // empty' <<<"$package_info")" || return "$?" fi # remove _\d$ from $installed_version (it's not there in the latest version, but the versions will otherwise match) @@ -50,6 +52,11 @@ brew::_provision_package() { && "$installed_version" != "$latest_version" ]]; then # NOTE: version check because auto_update packages aren't shown as outdated (even that ) + # manual installer packages cannot be upgraded + if [[ -n "$manual_installer" ]]; then + return + fi + # update brew upgrade --no-quarantine "$package" || return "$?" changed='true'