Skip to content

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

@4x0v7

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..

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions