On Tue, Jan 17, 2012 at 7:02 PM, Eric Hodel <drbr...@segment7.net> wrote:
>
> On Jan 11, 2012, at 4:55 PM, Luis Lavena wrote:
>
>> In master, I've the following failure:
>>
>>  12) Failure:
>> test_check_executable_overwrite_default_bin_dir(TestGemInstaller)
>> [C:/Users/Luis/Projects/oss/rubygems/rubygems/test/rubygems/test_gem_installer.rb:149]:
>> --- expected
>> +++ actual
>> @@ -1 +1 @@
>> -"\"executable\" from a conflicts with
>> C:/Users/Luis/Projects/oss/rubygems/rubygems/tmp/test/test_rubygems_3892/tmp/test/test_rubygems_3892/gemhome/bin/executable"
>> +"\"executable\" from a conflicts with installed executable from conflict"
>>
>> The error message comes from Gem::Installer#check_executable_overwrite
>>
>> What I don't understand is why is triggering a ruby_executable
>> (conflict = "installed executable…")
>
> I think it is because the windows executables have different lines in them.
>

bin/executable contains the shebang, I added a debug line to
check_executable_overwrite which resulted in:

{:generated_bin=>"#!C:/Users/Luis/Projects/oss/rubygems/rubygems/tmp/test/test_rubygems_6340/gemhome/bin/ruby.exe\n#\n#
This file was generated by RubyGems.\n#\n# The application 'conflict'
is installed as part of a gem, and\n# this file is here to facilitate
running it.\n#\n\nrequire 'rubygems'\n\nversion = \">= 0\"\n\nif
ARGV.first =~ /^_(.*)_$/ and Gem::Version.correct? $1 then\n  version
= $1\n  ARGV.shift\nend\n\ngem 'conflict', version\nload
Gem.bin_path('conflict', 'executable', version)\n"}

> Look line 142 in rubygems/installer.rb, it is explicitly looking for /^#!/, 
> not what a windows wrapper uses.
>

>From above output seems to be that first line does match with the
regexp, so why is not valid?

Continue to investigate, will report later :-)

>> PS: some single quotes will make more easy to spot what is the message
>> and what represents an executable or a gem. Gem named "a" confuses in
>> the generated language for non-english native speakers (at least it
>> does for me)
>
>
> If you have time to tackle the above, feel free to add them, otherwise I can 
> fix it.
>

Will do, thank you.
-- 
Luis Lavena
AREA 17
-
Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exupéry
_______________________________________________
RubyGems-Developers mailing list
http://rubyforge.org/projects/rubygems
RubyGems-Developers@rubyforge.org
http://rubyforge.org/mailman/listinfo/rubygems-developers

Reply via email to