On Fri, Oct 24, 2008 at 12:00 AM, Assaf Arkin <[EMAIL PROTECTED]> wrote:
> On Thu, Oct 23, 2008 at 10:40 AM, Luis Lavena <[EMAIL PROTECTED]> wrote:
>>
>> Hello everybody.
>>
>> I'm just investing a bit fixing some issues I found with latest 0.8.3
>> release and are hitting me hard to maintain One-Click installer.
>>
>> One of those is related to rake_system call and the "call" added, and
>> others are related to ruby and sh commands.
>>
>> I forked the project and added some fixed in windows branch:
>>
>> http://github.com/luislavena/rake/tree/windows
>>
>> So using that as base, I found the following discrepancy:
>>
>> http://pastie.org/299068
>>
>> Keep in mind that this version of ruby (patchlevel 114) has been
>> patched to solve the $? existstatus issues found in previous versions
>> of Ruby for Windows.
>>
>> http://blog.mmediasys.com/2008/05/24/random-bits-and-experiments/
>>
>> Looking more closer, I believe Kernel::system with mutliple arguments is
>> broken.
>>
>> ruby 1.8.6 (2008-03-03 patchlevel 114) [i686-linux]
>> irb(main):001:0> ENV['FOO'] = "hello"
>> => "hello"
>> irb(main):002:0> system "echo", "$FOO"
>> $FOO
>> => true
>> irb(main):003:0> system "echo $FOO"
>> hello
>> => true
>
> If you call system with a single argument, that argument goes through shell
> expansion (env variables, glob patterns, escaping, etc).  If you call with
> multiple arguments, the first one is the executable name, the rest are
> passed as command line arguments without shell expansion.  In other words,
> call system with multiple arguments if you want to bypass shell expansion.
> Assaf
>

Thank you for the clarification Assaf, the lack of documentation from
Ruby C code on this function made me doubt about it.

Now I can work on a pending patch dealing with extensionless commands
that should be expanded properly.

-- 
Luis Lavena
AREA 17
-
Human beings, who are almost unique in having the ability to learn from
the experience of others, are also remarkable for their apparent
disinclination to do so.
Douglas Adams
_______________________________________________
Rake-devel mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rake-devel

Reply via email to