Class: SSHKit::Command
- Inherits:
-
Object
- Object
- SSHKit::Command
- Defined in:
- lib/california/stage.rb
Instance Method Summary collapse
-
#user ⇒ Object
Define $HOME to be in /mnt/apps/USERNAME Add ~/bin to $PATH Source any existing .bash_profile in the home directory.
Instance Method Details
#user ⇒ Object
Define $HOME to be in /mnt/apps/USERNAME Add ~/bin to $PATH Source any existing .bash_profile in the home directory
68 69 70 71 72 73 74 75 |
# File 'lib/california/stage.rb', line 68 def user return yield unless [:user] %(sudo -u #{[:user]} #{environment_string} -- bash -c '\ export HOME=/mnt/apps/#{[:user]}; \ export PATH="$HOME/bin:$PATH"; \ source $HOME/.bash_profile; \ #{yield.to_s.gsub("'", %q('"'"'))}') end |