I'd like to keep my task definitions within deploy.rb, if possible. I can open the Command class in deploy.rb, if need be.
In what situation would we want the '\\\', anyway? "a\\\b" gets changed to: a\ b Would I break anything by changing "\\\n" to "\\n" in Command#process! Thanks for your help, Brian On Apr 10, 11:34 am, Jamis Buck <[EMAIL PROTECTED]> wrote: > I suspect that's breaking because your line break is inside a quoted > string...and capistrano's escaping is too naive to understand that. > You could put the command in a script and execute the script, thereby > foiling cap's escaping logic. > > - Jamis > > On Apr 10, 2008, at 10:23 AM, Brian Hartin wrote: > > > > > In line 24, we have > > > @command = command.strip.gsub(/\r?\n/, "\\\n") > > > If I have a remote command that includes line breaks, e.g. "echo -e 'a > > \nb' | foo' it will translate it to: > > > echo -e 'a\\\nb' | foo > > > Which fails. If I change that line in Process to use "\\n", or to use > > '\\\n' (single quotes), it works. It also works if I use non- > > interpolated strings in my command, but that is ugly. Am I missing > > something or should "\\\n" be "\\n"? > > > Thanks, > > > Brian Hartin > > > > > > smime.p7s > 3KDownload --~--~---------~--~----~------------~-------~--~----~ To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/capistrano -~----------~----~----~----~------~----~------~--~---
