Joe Swatosh
2/7/2007 11:01:00 PM
Hi Curt,
On Feb 7, 10:48 am, "Curt Hibbs" <ml.chi...@gmail.com> wrote:
> On 2/7/07, Joe <joe.swat...@gmail.com> wrote:
>
> Thanks... I hadn't noticed it still list 0.9.1 !
>
> Curt
rake.bat is still not working quite right for me. The error status
isn't properly being propagated from a child process. To make it
work, I had to conspire to make the ruby command the last in the batch
file (at least for NT, I don't have a non-NT box to test with.
Actually, I'm not sure what a non-NT system will do with the "exit /b"
but that's another problem). The file now looks like this:
<ruby.bat>
@echo off
goto endofruby
#!/bin/ruby
#
# This file was generated by RubyGems.
#
# The application 'rake' is installed as part of a gem, and
# this file is here to facilitate running it.
#
require 'rubygems'
version = "> 0"
if ARGV.size > 0 && ARGV[0][0]==95 && ARGV[0][-1]==95
if Gem::Version.correct?(ARGV[0][1..-2])
version = ARGV[0][1..-2]
ARGV.shift
end
end
gem 'rake', version
load 'rake'
__END__
:endofruby
if not "%~f0" == "~f0" goto WinNT
ruby -Sx "%0" %1 %2 %3 %4 %5 %6 %7 %8 %9
exit /b %ERRORLEVEL%
:WinNT
"%~d0%~p0ruby" -x "%~f0" %*
</ruby.bat>
I have not tested this extensively, but it is working here.
Another alternative might be to do the same as rake now does and
create a rake.cmd that invokes a rake directly. I noticed this after
doing a gem update rake.
--
Joe