Ah, clever, quoting the semicolon instead of escaping it. That works
for me locally. Can anyone else experiment with that to see if it
works for their setup? If no one reports any problems, I'll make that
change.
- Jamis
On Jun 19, 2007, at 2:09 PM, Mike I wrote:
>
> Unfortunately I'm behind a corporate firewall so I can't get you
> access to the machine. However, after quite a bit of fooling around, I
> believe I've solved it. The man page for find says the following about
> the "-exec" option:
>
> "Execute command; true if 0 status is returned. All following
> arguments to find are taken to be arguments to the command until an
> argument consisting of ';' is encountered. The string '{}' is
> replaced by the current file name being processed everywhere it occurs
> in the arguments to the command, not just in arguments where it is
> alone, as in some versions of find. Both of these constructions might
> need to be escaped (with a '\') or quoted to protect them from
> expansion by the shell. The command is executed in the starting
> directory."
>
>
> My understanding of this is that "{}" must also be escaped, not just
> the ";". So, I altered line 163 to be:
>
> run "find #{asset_paths} -exec touch -t #{stamp} '{}' ';'; true", :env
> => { "TZ" => "UTC" }
>
> This appears to work just fine on my machine, though I'm not sure how
> this will behave on other systems.
>
> -Mike
>
> On Jun 19, 3:50 pm, Jamis Buck <[EMAIL PROTECTED]> wrote:
>> At this point, I'm going to have to ask for help. I can't duplicate
>> this. Admittedly, I don't have a remote server exactly like what has
>> been reported, but I've tried going against RHEL, mac osx, and
>> freebsd, and I've tried hitting bash 2.5 and bash 3.0, and a vanilla
>> POSIX shell, and all have worked fine.
>>
>> Anyone that is having this problem: I need you to do some legwork to
>> investigate this more. That, or grant me login access to one of your
>> servers and allow me to try and duplicate the problem that way.
>>
>> Thanks,
>>
>> Jamis
>>
>> On Jun 19, 2007, at 1:44 PM, Mike I wrote:
>>
>>
>>
>>> Hi Jamis,
>>
>>> I too am having this problem. Adding the extra spaces in deploy.rb
>>> does not seem to solve the issue.
>>
>>> Here's my info:
>>
>>> uname:
>>> Linux uptwolx250 2.6.9-34.ELsmp #1 SMP Fri Feb 24 16:54:53 EST 2006
>>> i686 i686 i386 GNU/Linux
>>
>>> sh -version
>>> GNU bash, version 3.00.15(1)-release (i386-redhat-linux-gnu)
>>> Copyright (C) 2004 Free Software Foundation, Inc.
>>
>>> On Jun 19, 2:24 pm, Jamis Buck <[EMAIL PROTECTED]> wrote:
>>>> Tobi,
>>
>>>> Hmm. I've tried and tried, and I can't seem to duplicate this
>>>> error,
>>>> so I have way to know if any of the tweaks I make will "fix" the
>>>> problem.
>>
>>>> Could you try opening capistrano/recipes/deploy.rb, going to line
>>>> 163, an putting a space between the two semicolons? Does that make
>>>> things work any better?
>>
>>>> - Jamis
>>
>>>> On Jun 18, 2007, at 5:26 AM, tobi wrote:
>>
>>>>> Hi all!
>>
>>>>> I'm using the latest capistrano version 1.99.3. On executing "cap
>>>>> deploy" I do get a "syntax error near unexpected token `;;'"
>>>>> error:
>>
>>>>> ...
>>>>> * executing "find /app/releases/20070618111650/public/images /
>>>>> app/
>>>>> releases/20070618111650/public/stylesheets /app/releases/
>>>>> 20070618111650/public/javascripts -exec touch -t 200706181117.51
>>>>> {} \
>>>>> \;; true"
>>>>> servers: ["serv-4103"]
>>>>> [serv-4103] executing command
>>>>> ** [out :: serv-4103] sh: -c: line 1: syntax error near
>>>>> unexpected
>>>>> token `;;'
>>>>> ** [out :: serv-4103] sh: -c: line 1: `TZ=UTC find /app/releases/
>>>>> 20070618111650/public/images /app/releases/20070618111650/public/
>>>>> stylesheets /app/releases/20070618111650/public/javascripts -exec
>>>>> touch -t 200706181117.51 {} \\;; true'
>>>>> command finished
>>>>> *** [deploy:update_code] rolling back
>>>>> * executing "rm -rf /app/releases/20070618111650; true"
>>>>> servers: ["serv-4103"]
>>>>> [serv-4103] executing command
>>>>> command finished
>>>>> command "TZ=UTC find /app/releases/20070618111650/public/images /
>>>>> app/
>>>>> releases/20070618111650/public/stylesheets /app/releases/
>>>>> 20070618111650/public/javascripts -exec touch -t 200706181117.51
>>>>> {} \
>>>>> \;; true" failed on serv-4103
>>>>> ...
>>
>>>>> looks like an escape problem with \\;; - but I couldn't fix it.
>>
>>>>> remote system is:
>>>>> Linux serv-4103 2.6.5-7.276-smp #1 SMP Mon Jul 24 10:45:31 UTC
>>>>> 2006
>>>>> i686 i686 i386 GNU/Linux
>>
>>>>> sh -version
>>>>> -> GNU bash, version 2.05b.0(1)-release (i586-suse-linux)
>>>>> Copyright
>>>>> (C) 2002 Free Software Foundation, Inc.
>>
>>>>> Any ideas?
>>>>> Thanks, bye Tobi
>
>
> >
--~--~---------~--~----~------------~-------~--~----~
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/capistrano
-~----------~----~----~----~------~----~------~--~---