diff --git a/install.sh b/install.sh index d9ef3d5..3cbdbf1 100755 --- a/install.sh +++ b/install.sh @@ -32,10 +32,10 @@ install_dependencies() fmt_note "installing dependencies ..." case $(get_os_name) in "ubuntu"|"debian" ) - $SUDO "$DOTFILES/tools/ubuntu.sh" apt-install + $SUDOE "$DOTFILES/tools/ubuntu.sh" apt-install ;; "alpine" ) - $SUDO "$DOTFILES/tools/alpine.sh" apk-add + $SUDOE "$DOTFILES/tools/alpine.sh" apk-add ;; "macos" ) "$DOTFILES/tools/macos.sh" brew-install diff --git a/tools/common.sh b/tools/common.sh index f0a85ba..1957b3b 100755 --- a/tools/common.sh +++ b/tools/common.sh @@ -126,8 +126,10 @@ setup_color() { # END of color settings SUDO='' +SUDOE='' if [[ "$EUID" != "0" && -x $(command -v sudo) ]]; then SUDO='sudo' + SUDOE='sudo -E' fi ask_for_yN()