-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sinatra 2.0.6 regression: OptionParser::InvalidOption: invalid option: --pattern #1559
Comments
Thanks for the report. We'll cut a new release (v2.0.6.1 or v2.0.7) after fixing the issue. |
I believe this same bug is causing issues with RSpec when invoked using ± bundle exec rake
/Users/jason/.rbenv/versions/2.6.3/bin/ruby -I/Users/jason/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/rspec-core-3.8.2/lib:/Users/jason/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/rspec-support-3.8.2/lib /Users/jason/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/rspec-core-3.8.2/exe/rspec --pattern spec/\*\*\{,/\*/\*\*\}/\*_spec.rb
An error occurred while loading spec_helper.
Failure/Error: require File.expand_path('../config/environment', __dir__)
Bundler::GemRequireError:
There was an error while trying to load the gem 'sinatra'.
Gem Load Error is: invalid option: --pattern
Backtrace for gem load error is:
/Users/jason/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/sinatra-2.0.6/lib/sinatra/main.rb:18:in `<module:Sinatra>'
/Users/jason/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/sinatra-2.0.6/lib/sinatra/main.rb:1:in `<top (required)>'
/Users/jason/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/sinatra-2.0.6/lib/sinatra.rb:1:in `require'
/Users/jason/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/sinatra-2.0.6/lib/sinatra.rb:1:in `<top (required)>'
/Users/jason/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/bundler-2.0.2/lib/bundler/runtime.rb:81:in `require'
/Users/jason/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/bundler-2.0.2/lib/bundler/runtime.rb:81:in `block (2 levels) in require'
/Users/jason/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/bundler-2.0.2/lib/bundler/runtime.rb:76:in `each'
/Users/jason/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/bundler-2.0.2/lib/bundler/runtime.rb:76:in `block in require'
/Users/jason/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/bundler-2.0.2/lib/bundler/runtime.rb:65:in `each'
/Users/jason/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/bundler-2.0.2/lib/bundler/runtime.rb:65:in `require'
/Users/jason/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/bundler-2.0.2/lib/bundler.rb:114:in `require'
# etc. etc. etc. Strangely (to me, at least),
|
This is because the difference between the actual executable file and the actual caller haven't been handled properly. |
Oh, shoot. Apologies for the noise. The application code linked in the initial bug report is also using RSpec. |
@jgarber623 @rubys Could you try again with #1560? |
My tests pass with #1560 applied. |
I'll cut a patch release later. |
@namusyaka thank you for bugfix. #1560 works on my app too! |
Released v2.0.7: https://rubygems.org/gems/sinatra/versions/2.0.7 |
Error:
Reproduction instructions:
$ git clone https://github.com/rubys/sinatra206.git
$ cd sinatra206
$ bundle install
$ bundle exec rake test
This worked with Sinatra 2.0.5. See also https://travis-ci.org/apache/whimsy/jobs/574961311
The text was updated successfully, but these errors were encountered: