E
Eric Hodel
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
But if I run this:
ruby -e "system 'stub.bat'; p $?"
I get the wrong exit code (0 instead of 1).
If I can get the right exit code then failure to build rake
extensions will fail installs properly in Rubygems.
RubyGems build stubs that look something like this:
"c:\ruby\bin\ruby" -x "%~f0" %*
goto endofruby
#!/bin/ruby
abort 'boom'
__END__
:endofruby
But if I run this:
ruby -e "system 'stub.bat'; p $?"
I get the wrong exit code (0 instead of 1).
If I can get the right exit code then failure to build rake
extensions will fail installs properly in Rubygems.