diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2017-12-08 13:36:28 -0800 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2017-12-08 13:36:28 -0800 |
commit | e8c0ebd2483c0a4a060bedc043d301e1ebe2dcb7 (patch) | |
tree | 5b6e42e4e2832dcd4d82305ec2df56d7b8dab688 | |
parent | 9620ba27646edf81782e643c3ad04be4a7bc8a35 (diff) | |
download | chef-e8c0ebd2483c0a4a060bedc043d301e1ebe2dcb7.tar.gz |
fix priority array orderlcg/cleanup-node-map
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
-rw-r--r-- | lib/chef/node_map.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/chef/node_map.rb b/lib/chef/node_map.rb index 5cc24b9d25..dde93a437d 100644 --- a/lib/chef/node_map.rb +++ b/lib/chef/node_map.rb @@ -33,6 +33,8 @@ # # note that as this examples show filter values may be a scalar string or an array of scalar strings. # +# XXX: confusingly, in the *_priority_map the :klass may be an array of Strings of class names +# class Chef class NodeMap @@ -218,10 +220,10 @@ class Chef # are exactly equal # XXX: remove this in Chef-14 and use last-writer-wins (prepend if they match) if !new_matcher[:override] + # we only sort classes, which only sorts the handler array, this magically does not sort + # the priority array via the invisible else here. if new_matcher[:klass].is_a?(Class) cmp = compare_matcher_properties(new_matcher[:klass].name, matcher[:klass].name) - else - cmp = compare_matcher_properties(new_matcher[:klass], matcher[:klass]) end end end |