Fix usage of install_package
In commit ab2be5794d
return codes were
implemented, and the output of install_package was improperly assigned
to a variable when the return code was wanted.
All we need to do is restore the previous exit handling, but return $?
instead of hardcoding "0".
Reported-by: xftroxgpx <xftroxgpx@protonmail.com>
Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
b2e088e42c
commit
19dabcc19a
1 changed files with 4 additions and 4 deletions
|
@ -1069,8 +1069,8 @@ check_build_status() {
|
||||||
&& ! (( FORCE || SOURCEONLY || NOBUILD || NOARCHIVE)); then
|
&& ! (( FORCE || SOURCEONLY || NOBUILD || NOARCHIVE)); then
|
||||||
if (( INSTALL )); then
|
if (( INSTALL )); then
|
||||||
warning "$(gettext "A package has already been built, installing existing package...")"
|
warning "$(gettext "A package has already been built, installing existing package...")"
|
||||||
status=$(install_package)
|
install_package
|
||||||
exit $status
|
exit $?
|
||||||
else
|
else
|
||||||
error "$(gettext "A package has already been built. (use %s to overwrite)")" "-f"
|
error "$(gettext "A package has already been built. (use %s to overwrite)")" "-f"
|
||||||
exit $E_ALREADY_BUILT
|
exit $E_ALREADY_BUILT
|
||||||
|
@ -1092,8 +1092,8 @@ check_build_status() {
|
||||||
if (( allpkgbuilt )); then
|
if (( allpkgbuilt )); then
|
||||||
if (( INSTALL )); then
|
if (( INSTALL )); then
|
||||||
warning "$(gettext "The package group has already been built, installing existing packages...")"
|
warning "$(gettext "The package group has already been built, installing existing packages...")"
|
||||||
status=$(install_package)
|
install_package
|
||||||
exit $status
|
exit $?
|
||||||
else
|
else
|
||||||
error "$(gettext "The package group has already been built. (use %s to overwrite)")" "-f"
|
error "$(gettext "The package group has already been built. (use %s to overwrite)")" "-f"
|
||||||
exit $E_ALREADY_BUILT
|
exit $E_ALREADY_BUILT
|
||||||
|
|
Loading…
Add table
Reference in a new issue