Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

CHEF-607: Slightly faster ;P

  • Loading branch information...
commit 8ed1a0982857786035f3e0b9f49aca2a08e22ee0 1 parent 2be8a51
@fujin authored
Showing with 1 addition and 2 deletions.
  1. +1 −2  chef/lib/chef/mixin/language_include_attribute.rb
View
3  chef/lib/chef/mixin/language_include_attribute.rb
@@ -38,8 +38,7 @@ def include_attribute(*args)
Chef::Log.debug("Loading Attribute #{attrib}")
node.run_state[:seen_attributes][attrib] = true
- @cookbook_loader = Chef::CookbookLoader.new
- @cookbook_loader.load_cookbooks
+ @cookbook_loader ||= (cl = CookbookLoader.new; cl.load_cookbooks; cl)
if amatch = attrib.match(/(.+?)::(.+)/)
cookbook = @cookbook_loader[amatch[1].to_sym]
Please sign in to comment.
Something went wrong with that request. Please try again.