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

Undefined config contexts are not ignored when config_strict_mode: false #34

Open
mcquin opened this issue Jun 6, 2016 · 0 comments
Open
Labels
Type: Bug Does not work as expected.

Comments

@mcquin
Copy link

mcquin commented Jun 6, 2016

When I define:

class MyConfig
  extend Mixlib::Config
    config_context :context_a
  end
end

and my config looks like:

option :value
context_a['a_option'] = a_value
context_b['b_option'] = b_value

and I load my config, I get:

undefined method `[]=' on nil

When my config class is defined with config_context :context_b, I do not get an error.

It would be nice if Mixlib::Config would ignore undefined config contexts when config_strict_mode is false (or unset). This would allow us to define extensible configs that can be read by multiple applications.

@tas50 tas50 added the Type: Bug Does not work as expected. label Apr 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Does not work as expected.
Projects
None yet
Development

No branches or pull requests

2 participants