fix(installer): tolerate sudo shims without -k

This commit is contained in:
Lucas Ma 2026-06-15 11:50:00 +08:00
parent 5181447da8
commit 9ccac33cef

View File

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