Fail the package audit when the manifest is missing

Reading a nonexistent manifest produced an empty package list, so the audit
reported every package installed after checking none of them.
This commit is contained in:
Ryan Hughes
2026-08-30 16:30:51 -04:00
parent d6130394fa
commit d3a5e69162
+6 -1
View File
@@ -8,12 +8,17 @@ status=0
verify_core_packages() {
local package
local manifest="$OMARCHY_PATH/install/omarchy-base.packages"
local -a missing=()
# Without this, a missing manifest reads as an empty package list and the
# audit passes having checked nothing.
[[ -f $manifest ]] || fail "all Omarchy core packages are installed" "package manifest not found: $manifest"
while IFS= read -r package; do
[[ -z $package || $package == \#* ]] && continue
pacman -Q "$package" >/dev/null 2>&1 || missing+=("$package")
done <"$OMARCHY_PATH/install/omarchy-base.packages"
done <"$manifest"
(( ${#missing[@]} == 0 )) || fail "all Omarchy core packages are installed" "missing packages: ${missing[*]}"
pass "all Omarchy core packages are installed (${#missing[@]} missing)"