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() {