fix(installer): handle sudo shims that don't support -k flag (#13651)

Related to #13585

Co-authored-by: Daniel Bates <daniel@batesai.org>
master
Marc Cornellà 2 months ago committed by GitHub
parent 11c1718983
commit 76ffd9e22a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 3
      tools/install.sh

@ -473,7 +473,8 @@ EOF
# be prompted for the password either way, so this shouldn't cause any issues.
#
if user_can_sudo; then
sudo -k chsh -s "$zsh" "$USER" # -k forces the password prompt
sudo -k >/dev/null 2>&1 # -k forces the password prompt
sudo chsh -s "$zsh" "$USER"
else
chsh -s "$zsh" "$USER" # run chsh normally
fi

Loading…
Cancel
Save