From f79ccffa25bc449901cea657c17ee2bb68fd9cde Mon Sep 17 00:00:00 2001 From: Price Hiller Date: Sat, 30 Jul 2022 23:05:27 -0500 Subject: [PATCH] fix: evaluate pkg installer --- install.bash | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/install.bash b/install.bash index 216f5b2..99b51ea 100644 --- a/install.bash +++ b/install.bash @@ -146,11 +146,17 @@ install-from-pkg-mngr() { fi local pkg_to_install="${*}" + local ret_code=0 log "info" "Installing ${GREEN}${pkg_to_install}${RESET_BOLD}" - if ! "${PKG_INSTALL_CMD} ${pkg_to_install}"; then + if ! "$(eval "${PKG_INSTALL_CMD}" "${pkg_to_install}")"; then log "error" "Failed to install ${GREEN}${pkg_to_install}${RESET_BOLD}" + ret_code=1 + fi + if ((ret_code > 0)); then + return 1 + else + log "info" "Successfully installed ${GREEN}${pkg_to_install}${RESET_BOLD}" fi - log "info" "Successfully installed ${GREEN}${pkg_to_install}${RESET_BOLD}" } deploy-config() {