I'm not sure, but I don't think sudo will work with a bash script as
an argument. You could try that from the command-line, directly, and
see if it works or not. You might need to either put that if
statement in a script, which you then invoke, or invoke the entire
thing via sh, directly. In other words, either this:
sudo "script/make_dir #{src_home}"
Or this:
sudo "sh -c 'blah blah blah'"
- Jamis
On Apr 4, 2007, at 12:55 PM, Steven Wisener wrote:
>
> I'm having problems with Capistrano and the sudo command. It looks
> like Capistrano is not forwarding on the password when prompted.
> Here's the command:
>
> sudo <<-CMD
> if [ ! -d #{src_home} ]
> then
> mkdir -p #{src_home}
> fi
> CMD
>
> Here's the output:
>
> * executing "sudo if [ ! -d /usr/local/packages ]\n then
> \n mkdir -p /usr/local/packages\n fi"
> servers: ["someserver"]
> Password:
> [someserver] executing command
> ** [out :: someserver] someuser's password:
>
> The command looks correct, but it's sending the password prompt
> instead of sending my password. The only notable thing is that after I
> enter the password at the prompt, it thinks about it for 5-10 seconds
> before the "executing command" line prints. Any idea what's going on?
> Does cap only wait for so long when expecting the password prompt?
>
> --Steven
>
>
> >
--~--~---------~--~----~------------~-------~--~----~
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/capistrano
-~----------~----~----~----~------~----~------~--~---