diff options
Diffstat (limited to 'lib/chef/run_list')
-rw-r--r-- | lib/chef/run_list/versioned_recipe_list.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/chef/run_list/versioned_recipe_list.rb b/lib/chef/run_list/versioned_recipe_list.rb index 2824f08f31..803156aef9 100644 --- a/lib/chef/run_list/versioned_recipe_list.rb +++ b/lib/chef/run_list/versioned_recipe_list.rb @@ -82,6 +82,21 @@ class Chef qualified_recipe end end + + # Get an array of strings of both fully-qualified and unexpanded recipe names + # in response to chef/chef#3767 + # Chef-13 will revert to the behaviour of just including the fully-qualified name + # + # @return [Array] Array of strings with fully-qualified and unexpanded recipe names + def with_duplicate_names + self.map do |recipe_name| + if recipe_name.include?('::') + recipe_name + else + [recipe_name, "#{recipe_name}::default"] + end + end.flatten + end end end end |