Skip to content

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

@mcquin

Description

@mcquin

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: BugDoes not work as expected.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions