summaryrefslogtreecommitdiff
path: root/lib/chef/resource.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/resource.rb')
-rw-r--r--lib/chef/resource.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/chef/resource.rb b/lib/chef/resource.rb
index 8b3084487f..d6c5fe7cdf 100644
--- a/lib/chef/resource.rb
+++ b/lib/chef/resource.rb
@@ -1499,7 +1499,11 @@ class Chef
#
def self.use(partial)
if partial =~ /^core::(.*)/
- class_eval IO.read(::File.expand_path("resource/core_partials/#{$1}.rb", __dir__))
+ partial = $1
+ dirname = ::File.dirname(partial)
+ basename = ::File.basename(partial, ".rb")
+ basename = basename[1..] if basename.start_with?("_")
+ class_eval IO.read(::File.expand_path("resource/#{dirname}/_#{basename}.rb", __dir__))
else
dirname = ::File.dirname(partial)
basename = ::File.basename(partial, ".rb")