You're absolutely right. Error between keyboard and monitor... I got
thrown by the puts and assumed that was the problem.
On Jan 31, 6:34 am, Jamis Buck <[EMAIL PROTECTED]> wrote:
> Andrew, doubling the backlashes ought to work. The double slashes that
> are displayed in the "executing" line are an artifact of how Ruby's
> String#inspect method works--it escapes slashes for display, but there
> are really only single slashes in the string. In other words:
>
> s = "\\(DEPLOY\\)"
> puts(s) #--> \(DEPLOY\)
> puts(s.inspect) #--> "\\(DEPLOY\\)"
>
> Are you getting an error when you use the double backslashes? Or is it
> just not doing what you are expecting it to do?
>
> - Jamis
>
> On Jan 31, 2008, at 3:25 AM, Andrew McClain wrote:
>
>
>
> > I can't figure out how to escape backslashes in my run command...
>
> > task :flip_deploy_switch, :except => { :no_release => true } do
> > run "sed -e 's/^\(DEPLOY =\).*/\1 #{deploy_settings_var}/g'
> > #{release_path}/settings.py.old > #{release_path}/settings.py"
> > end
>
> > yields
>
> > * executing "sed -e 's/^(DEPLOY =).*/\001 True/g' /usr/local/src/
> > panda-
> > deploy/releases/20080131100217/settings.py.old > /usr/local/src/panda-
> > deploy/releases/20080131100217/settings.py"
>
> > but escaping the backslashes doesn't work either!
>
> > task :flip_deploy_switch, :except => { :no_release => true } do
> > run "sed -e 's/^\\(DEPLOY =\\).*/\\1 #{deploy_settings_var}/g'
> > #{release_path}/settings.py.old > #{release_path}/settings.py"
> > end
>
> > yields
> > * executing "sed -e 's/^\\(DEPLOY =\\).*/\\1 True/g' /usr/local/src/
> > panda-deploy/releases/20080131102405/settings.py.old > /usr/local/src/
> > panda-deploy/releases/20080131102405/settings.py"
>
> > What can I do??
> > >
>
>
> 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
-~----------~----~----~----~------~----~------~--~---