diff --git a/.gitea/workflows/build-and-publish.yaml b/.gitea/workflows/build-and-publish.yaml index b83929c..3216620 100644 --- a/.gitea/workflows/build-and-publish.yaml +++ b/.gitea/workflows/build-and-publish.yaml @@ -45,8 +45,10 @@ jobs: # depends check via -d. Rationale: moonarch-git's runtime depends # include AUR-only packages (stasis, auto-cpufreq, ttf-ubuntusans-nerd) # which pacman can't resolve. Those deps aren't needed at build time. - MAKEDEPS=$(awk '/^makedepends=\(/,/^\)/' PKGBUILD | grep -oE "'[^']+'" | tr -d "'" | tr '\n' ' ') - if [ -n "$MAKEDEPS" ]; then + # Source the PKGBUILD in a subshell to read the array robustly — + # awk/grep parsing breaks on single-line vs multi-line formats. + MAKEDEPS=$(bash -c 'source ./PKGBUILD 2>/dev/null; printf "%s " "${makedepends[@]}"') + if [ -n "${MAKEDEPS// }" ]; then # shellcheck disable=SC2086 sudo pacman -S --needed --noconfirm $MAKEDEPS fi