fix graywolf version

This commit is contained in:
David Young
2026-05-30 06:35:57 -06:00
parent 725b1a9b18
commit 9f5abe4cf6

View File

@@ -11,7 +11,17 @@ get_installed_version() {
local app="$1" local app="$1"
local gui="$2" local gui="$2"
# Skip --version check for GUI apps as it would launch them # Check version file first — it's authoritative for compiled apps
if [ -f "$VERSION_FILE" ]; then
local stored
stored=$(grep "^$app=" "$VERSION_FILE" | cut -d'=' -f2)
if [ -n "$stored" ]; then
echo "$stored"
return
fi
fi
# Fall back to --version for non-GUI apps not yet in the version file
if [ "$gui" != "true" ]; then if [ "$gui" != "true" ]; then
if command -v "$app" &> /dev/null; then if command -v "$app" &> /dev/null; then
local ver local ver
@@ -23,16 +33,6 @@ get_installed_version() {
fi fi
fi fi
# Fall back to version file
if [ -f "$VERSION_FILE" ]; then
local stored
stored=$(grep "^$app=" "$VERSION_FILE" | cut -d'=' -f2)
if [ -n "$stored" ]; then
echo "$stored"
return
fi
fi
echo "unknown" echo "unknown"
} }