Skip to content

Error 'undefined method `each' for nil:NilClass' thrown if 'pillars' is not defined #343

Description

@4x0v7

If pillars are not defined, an error is thrown:

Message: Failed to complete #converge action: [undefined method `each' for nil:NilClass]

Looking at the code, it's coming from this line:
https://github.com/saltstack/kitchen-salt/blob/v0.7.2/lib/kitchen-salt/pillars.rb#L63

If a user is defining pillars_from_directories or pillars_from_files I think that should be taken into account by the prepare_pillar_files function, am I reading the code correctly?

My workaround is to just define pillars to be the same as what I'd like to import using pillars_from_directories

I'm still understanding the codebase while working on developing some salt states, so I might not be fully understanding something here..

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions