Skip to content
Browse files

A comment about a potential better met? test in 'zsh'.

  • Loading branch information...
1 parent 2d148d1 commit 7fb1f86bb2077806169927262b383a38aa5e1397 @benhoskings committed
Showing with 2 additions and 0 deletions.
  1. +2 −0 shells.rb
View
2 shells.rb
@@ -17,6 +17,8 @@
dep 'zsh', :username do
username.default!(shell('whoami'))
requires 'zsh.shell_setup'
+ # It would be great to be able to do this, but GNU `login` doesn't have '-f'.
+ # met? { shell("login -f '#{username}' env").val_for('SHELL') == which('zsh') }
met? { shell("sudo su - '#{username}' -c 'echo $SHELL'") == which('zsh') }
meet { sudo("chsh -s '#{which('zsh')}' #{username}") }
end

0 comments on commit 7fb1f86

Please sign in to comment.
Something went wrong with that request. Please try again.