fix: evaluate pkg installer

This commit is contained in:
Price Hiller 2022-07-30 23:05:27 -05:00
parent 032ed83fb4
commit f79ccffa25

View File

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