Fix issue where we didn't exit when we were supposed to.

Exiting from a subshell doesn't actually exit the script.  Move the exit to
outside of the subshell.
This commit is contained in:
Peter Ajamian 2022-02-11 14:46:51 +13:00
parent c8737c2302
commit f3fe6d768a

View file

@ -357,11 +357,9 @@ bin_check() {
# as a special-case below to avoid having the extras repository map to epel.
repoquery () {
local name val prev result
result=$(
safednf -y -q "${dist_repourl_swaps[@]}" \
--setopt=epel.excludepkgs=epel-release repoquery -i "$1" ||
exit_message "Failed to fetch info for package $1."
)
result=$(safednf -y -q "${dist_repourl_swaps[@]}" \
--setopt=epel.excludepkgs=epel-release repoquery -i "$1") ||
exit_message "Failed to fetch info for package $1."
if ! [[ $result ]]; then
# We didn't match this package, the repo could be disabled.
return 1