fix graywolf version
This commit is contained in:
@@ -11,7 +11,17 @@ get_installed_version() {
|
||||
local app="$1"
|
||||
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 command -v "$app" &> /dev/null; then
|
||||
local ver
|
||||
@@ -23,16 +33,6 @@ get_installed_version() {
|
||||
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"
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user