On 5/19/09 9:03 PM, Scott Johnson wrote:
> I will try that and get back to you...
>
> The root problem here is that the SSH exec request parses the supplied
> command using the user's default shell, which is uncontrollable. Is
> that right?

Right.

> What if we did SSH exec of "sh" (without -c), then sent the command
> over the channel (followed by "exit")?

Yeah, that's (more or less) the "login shell" scenario I mentioned 
earlier. It's possible, but non-trivial. At one point I got Capistrano 
*kind of* working with a login shell, but I didn't have the time, 
motivation, or energy to pursue it. Besides which, although there are 
undeniably benefits to using a login shell, there are drawbacks to that 
approach, too (notably, it is pretty fragile to programatically 
manipulate a login shell, for various reasons).

Honestly, the simplest option for you would be to put the stuff that you 
need backticks in, in a separate script file, and then invoke that 
script from Capistrano. That, or switch your default shell to something 
posix.

- Jamis

>
>
> On 19 May, 18:42, Jamis Buck<[email protected]>  wrote:
>> Ah! I think I may have found a work-around.
>>
>> If you use single-quotes instead of double-quotes, the string isn't
>> immediately interpolated, so:
>>
>>     sh -c 'echo I need some `help`'
>>
>> appears to work, even if the calling shell is tcsh. Can you verify?
>>
>> - Jamis
>
> >

--~--~---------~--~----~------------~-------~--~----~
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at http://groups.google.com/group/capistrano
-~----------~----~----~----~------~----~------~--~---

Reply via email to