Skip to content
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

cucumber --i18n <invalid_language> breaks #869

Closed
tejasbubane opened this issue Jun 16, 2015 · 3 comments
Closed

cucumber --i18n <invalid_language> breaks #869

tejasbubane opened this issue Jun 16, 2015 · 3 comments

Comments

@tejasbubane
Copy link

When I run cucumber --i18n ja, I get the proper japanese output.
But when I drop an invalid language it breaks:

tech-6@batman:~/calculator|⇒  cucumber --i18n ma
undefined method `[]' for nil:NilClass (NoMethodError)
/home/tech-6/.rvm/gems/ruby-2.2.2/gems/gherkin-2.12.2/lib/gherkin/i18n.rb:93:in `initialize'
/home/tech-6/.rvm/gems/ruby-2.2.2/gems/gherkin-2.12.2/lib/gherkin/i18n.rb:25:in `new'
/home/tech-6/.rvm/gems/ruby-2.2.2/gems/gherkin-2.12.2/lib/gherkin/i18n.rb:25:in `get'
/home/tech-6/.rvm/gems/ruby-2.2.2/gems/cucumber-2.0.0/lib/cucumber/cli/options.rb:374:in `list_keywords_and_exit'
/home/tech-6/.rvm/gems/ruby-2.2.2/gems/cucumber-2.0.0/lib/cucumber/cli/options.rb:122:in `block (2 levels) in parse!'
/home/tech-6/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/optparse.rb:1396:in `call'
/home/tech-6/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/optparse.rb:1396:in `block in parse_in_order'
/home/tech-6/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/optparse.rb:1383:in `catch'
/home/tech-6/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/optparse.rb:1383:in `parse_in_order'
/home/tech-6/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/optparse.rb:1377:in `order!'
/home/tech-6/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/optparse.rb:1469:in `permute!'
/home/tech-6/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/optparse.rb:1491:in `parse!'
/home/tech-6/.rvm/gems/ruby-2.2.2/gems/cucumber-2.0.0/lib/cucumber/cli/options.rb:253:in `parse!'
/home/tech-6/.rvm/gems/ruby-2.2.2/gems/cucumber-2.0.0/lib/cucumber/cli/configuration.rb:25:in `parse!'
/home/tech-6/.rvm/gems/ruby-2.2.2/gems/cucumber-2.0.0/lib/cucumber/cli/main.rb:64:in `block in configuration'
/home/tech-6/.rvm/gems/ruby-2.2.2/gems/cucumber-2.0.0/lib/cucumber/cli/main.rb:63:in `tap'
/home/tech-6/.rvm/gems/ruby-2.2.2/gems/cucumber-2.0.0/lib/cucumber/cli/main.rb:63:in `configuration'
/home/tech-6/.rvm/gems/ruby-2.2.2/gems/cucumber-2.0.0/lib/cucumber/cli/main.rb:35:in `execute!'
/home/tech-6/.rvm/gems/ruby-2.2.2/gems/cucumber-2.0.0/bin/cucumber:9:in `<top (required)>'
/home/tech-6/.rvm/gems/ruby-2.2.2/bin/cucumber:23:in `load'
/home/tech-6/.rvm/gems/ruby-2.2.2/bin/cucumber:23:in `<main>'
/home/tech-6/.rvm/gems/ruby-2.2.2/bin/ruby_executable_hooks:15:in `eval'
/home/tech-6/.rvm/gems/ruby-2.2.2/bin/ruby_executable_hooks:15:in `<main>'

I think this should be handled properly, maybe telling that the language is not available or even giving the list of available languages.

@mattwynne
Copy link
Member

Thanks for reporting. If you'd like to help us with a fix we can support you with TDD'ing it.

@mattwynne
Copy link
Member

Thanks @danascheider 😄

@lock
Copy link

lock bot commented Oct 25, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Oct 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants