Try, task :foo, :hosts => "my.host.com" do run "echo date is `cat /bin/date` so there" end
2009/5/19 Scott Johnson <[email protected]> > > I have a run command that uses shell backticks, yet the command in the > backticks never runs and I get an empty string instead of the output > of the command. > > My Capfile: > > task :foo, :hosts => "my.host.com" do > run "echo date is `/bin/date` so there" > end > > Output from running 'cap foo': > * executing 'foo' > * executing "echo date is `/bin/date` so there" > servers: ["my.host.com"] > [my.host.com] executing command > ** [out :: my.host.com] date is so there > command finished > > Bizarre. > > I'm running cap 2.5.5 on Fedora Core release 6 with Ruby 1.8.7. The > local and remote machine are the same (ie, I'm launching cap from > my.host.com). > > If I edit line 212 of lib/capistrano/command.rb (that escapes certain > special characters in the command) and remove the backtick from the > gsub args, it works. But I somehow doubt this is the proper solution, > since I seem to be the only one having this problem. > > > > > --~--~---------~--~----~------------~-------~--~----~ To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/capistrano -~----------~----~----~----~------~----~------~--~---
