mirror of
https://github.com/robbyrussell/oh-my-zsh.git
synced 2026-10-02 16:03:47 +02:00
fix(installer): tolerate sudo shims without -k (#13821)
Co-authored-by: Lucas Ma <7184042+pony-maggie@users.noreply.github.com>
This commit is contained in:
1 parent
0a91ce20d5
commit
96ea17080a
1 file changed
+1
-1
+1
-1
@@ -473,7 +473,7 @@ 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 >/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"
|
sudo chsh -s "$zsh" "$USER"
|
||||||
else
|
else
|
||||||
chsh -s "$zsh" "$USER" # run chsh normally
|
chsh -s "$zsh" "$USER" # run chsh normally
|
||||||
|
|||||||
Reference in new issue
Block a user