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
--~--~---------~--~----~------------~-------~--~----~
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/capistrano
-~----------~----~----~----~------~----~------~--~---


Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to