chef-ingredient icon indicating copy to clipboard operation
chef-ingredient copied to clipboard

'channel' attributes are Symbols, Policyfiles won't allow Symbols

Open mattray opened this issue 6 years ago • 1 comments

This is a bug for chef-ingredient currently, but it may be considered a Policyfile bug.

If you try to set :stable in your Policyfile you get Reason: (ChefDK::InvalidPolicyfileAttribute) Invalid type in attributes. Only Hash, Array, String, Integer, Float, true, false, and nil are accepted. You gave :stable (Symbol)

Strings will work.

mattray avatar Aug 10 '18 05:08 mattray

@mattray I understand why this is confusing since the channel attribute restricts types to Symbols. This isn't as much a bug in Policyfiles or chef-ingredient as it is more idiosyncratic. The issue here is that the cookbook shouldn't use Symbols and should use Strings for this exact reason - it can be confusing - although it works functionally. I do agree the cookbook should be updated to eliminate this Ruby-ism. Noted!

wrightp avatar Aug 10 '18 15:08 wrightp