Skip to content

Commit 76ffd9e

Browse files
fix(installer): handle sudo shims that don't support -k flag (ohmyzsh#13651)
Related to ohmyzsh#13585 Co-authored-by: Daniel Bates <daniel@batesai.org>
1 parent 11c1718 commit 76ffd9e

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

tools/install.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,8 @@ EOF
473473
# be prompted for the password either way, so this shouldn't cause any issues.
474474
#
475475
if user_can_sudo; then
476-
sudo -k chsh -s "$zsh" "$USER" # -k forces the password prompt
476+
sudo -k >/dev/null 2>&1 # -k forces the password prompt
477+
sudo chsh -s "$zsh" "$USER"
477478
else
478479
chsh -s "$zsh" "$USER" # run chsh normally
479480
fi

0 commit comments

Comments
 (0)