Recognize the omarchy-dev package in omarchy-version
The edge channel installs omarchy-dev, but omarchy-version only queried omarchy, so it exited 1 there. omarchy-snapshot runs under set -e, so the failed lookup aborted the whole update over a snapshot label. It only worked at all because omarchy-dev declares provides=(omarchy) from the installer repo. Builds without it fail, so check both packages here instead of relying on a declaration from another tree. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
38c1352f6d
commit
9174fbf851
+1
-1
@@ -37,7 +37,7 @@ fi
|
||||
cat > "$LOG_FILE" <<EOF
|
||||
Date: $(date)
|
||||
Hostname: $(hostname)
|
||||
Omarchy Package: $(pacman -Q omarchy 2>/dev/null || echo "unknown")
|
||||
Omarchy Package: $(pacman -Q omarchy-dev 2>/dev/null || pacman -Q omarchy 2>/dev/null || echo "unknown")
|
||||
|
||||
=========================================
|
||||
SYSTEM INFORMATION
|
||||
|
||||
@@ -19,7 +19,8 @@ fi
|
||||
|
||||
case "$COMMAND" in
|
||||
create)
|
||||
DESC="$(omarchy-version)"
|
||||
# The description is just a label, so never let it abort the snapshot.
|
||||
DESC="$(omarchy-version 2>/dev/null || echo unknown)"
|
||||
|
||||
echo -e "\e[32mCreate system snapshot\e[0m"
|
||||
|
||||
|
||||
+6
-1
@@ -17,7 +17,12 @@ if [[ $omarchy_path != "/usr/share/omarchy" ]]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
version=$(pacman -Q omarchy 2>/dev/null | awk '{ print $2 }')
|
||||
# The edge channel installs omarchy-dev instead of omarchy, so check both.
|
||||
for package in omarchy-dev omarchy; do
|
||||
version=$(pacman -Q "$package" 2>/dev/null | awk '{ print $2 }')
|
||||
[[ -n $version ]] && break
|
||||
done
|
||||
|
||||
[[ -n $version ]] || exit 1
|
||||
|
||||
echo "$version"
|
||||
|
||||
Reference in New Issue
Block a user