logo       

default_environment not working unless variable is specified in command: msg#00176

lang.ruby.capistrano.general

Subject: default_environment not working unless variable is specified in command


Hi, I've got the following code:

default_environment['PATH'] = "$PATH:/var/lib/gems/1.8/bin"

task :check_env do
sudo "echo $PATH && mongrel_rails"
sudo "$PATH; mongrel_rails"
sudo "mongrel_rails"
end

The first two sudo commands run correctly and show the mongrel_rails
help. The last command doesn't run with the message "sudo:
mongrel_rails: command not found". It seems like the path is only
being set if the path variable is called somewhere first (and it must
be first, "mongrel_rails; $PATH" doesn't work).


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise