From b1b8f47e597fbcc538c727c0fbcdf3fb9288196a Mon Sep 17 00:00:00 2001 From: toluschr Date: Mon, 10 Jun 2024 11:13:08 +0200 Subject: [PATCH] Simplify if-else statement --- xdeb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/xdeb b/xdeb index dbeeb55..006275e 100755 --- a/xdeb +++ b/xdeb @@ -334,10 +334,9 @@ xbps-rindex -a "${out}.${archs}.xbps" if [ "${XDEB_REFUSE}" = true ]; then log_crit "Errors occurred. Do not install the package on this system!" + return 1 elif [ "${XDEB_OPT_INSTALL}" = true ]; then "$(command -v sudo doas 2>/dev/null | head -n1)" xbps-install -R "${XDEB_BINPKGS#"${PWD}/"}" "${out}" else log_info "Install using \`xbps-install -R ${XDEB_BINPKGS#"${PWD}/"} ${out}\`" fi - -[ "${XDEB_REFUSE}" = true ] && return 1