summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2017-05-24 00:03:39 -0400
committerLuke Shumaker <lukeshu@lukeshu.com>2017-05-24 00:03:39 -0400
commit2b4bc5eff0c3b7cbb1d5b50c62eaf02f3f9badab (patch)
treeb20fcd00173c2ceef8321e34c666ee951ee639e2 /src
parent7d862c0bb25e2bbcb6973024556734019014e588 (diff)
librerelease: Be more careful with config parsing (fixes test)
Diffstat (limited to 'src')
-rwxr-xr-xsrc/abslibre-tools/librerelease22
1 files changed, 16 insertions, 6 deletions
diff --git a/src/abslibre-tools/librerelease b/src/abslibre-tools/librerelease
index b8eb0e3..41eb21b 100755
--- a/src/abslibre-tools/librerelease
+++ b/src/abslibre-tools/librerelease
@@ -165,13 +165,23 @@ main() {
return 0
fi
- load_files makepkg
- check_vars makepkg GPGKEY
- load_files libretools
- check_vars libretools WORKDIR REPODEST ABSLIBREDEST || return 1
+ # defer exiting on errors until we've tried to parse *all*
+ # config files, to have more complete error messages.
+ local err=false
+ {
+ load_files makepkg &&
+ check_vars makepkg GPGKEY
+ } || err=true
+ {
+ load_files libretools &&
+ # the HOOK* are settings are optional
+ check_vars libretools WORKDIR REPODEST ABSLIBREDEST # HOOKPRERELEASE HOOKPOSTRELEASE
+ } || err=true
+ if $err; then
+ return 6
+ fi
+
REPODEST+='/staging/'
- # The following settings are actually optional
- #check_vars libretools HOOKPRERELEASE HOOKPOSTRELEASE || return 1
"$mode"
}