mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-04-10 04:26:17 +02:00
fix(installer): handle sudo shims that don't support -k flag
Related to #13585 Co-authored-by: Daniel Bates <daniel@batesai.org>
This commit is contained in:
parent
11c1718983
commit
fb1eddc2ec
1 changed files with 2 additions and 1 deletions
|
|
@ -473,7 +473,8 @@ EOF
|
||||||
# be prompted for the password either way, so this shouldn't cause any issues.
|
# be prompted for the password either way, so this shouldn't cause any issues.
|
||||||
#
|
#
|
||||||
if user_can_sudo; then
|
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
|
else
|
||||||
chsh -s "$zsh" "$USER" # run chsh normally
|
chsh -s "$zsh" "$USER" # run chsh normally
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue