From: Eric Hodel Date: 2006-12-26T09:22:22+09:00 Subject: Re: windows bat file help needed for rubygems On Dec 25, 2006, at 15:57, Eric Hodel wrote: > On Dec 25, 2006, at 15:39, Wilson Bilkovich wrote: >> On 12/25/06, Eric Hodel wrote: >>> How do I get a windows .bat file to return a proper exit code? >>> >>> RubyGems build stubs that look something like this: >>> >>> "c:\ruby\bin\ruby" -x "%~f0" %* >>> goto endofruby >>> #!/bin/ruby >>> abort 'boom' >>> __END__ >>> :endofruby >> >> What do you get when you put: >> exit %ERRORLEVEL% >> under the :endofruby label? >> >> From my quick test, the ruby interpreter returns a proper code, and >> the command shell sets the ERRORLEVEL variable correctly. > > Your name will live forever in the rubygems ChangeLog. Hrm, it seems that gems doesn't generate .bat files, but instead generates .cmd files. I'll ask Curt about this. -- Eric Hodel - drbrain@segment7.net - http://blog.segment7.net I LIT YOUR GEM ON FIRE!