kitchen-salt icon indicating copy to clipboard operation
kitchen-salt copied to clipboard

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

Open 4x0v7 opened this issue 2 years ago • 0 comments

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

4x0v7 avatar Apr 08 '22 05:04 4x0v7