Permalink
Browse files

Merge pull request #746 from pcarlisle/ticket/master/13858-types-in-e…

…nvironments

(#13858) Use current environment when loading types
  • Loading branch information...
slippycheeze committed May 8, 2012
2 parents c71690a + 32e33ff commit 96712efeb543928704fc9938e7429552d8ded039
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/puppet/metatype/manager.rb
@@ -1,5 +1,6 @@
require 'puppet'
require 'puppet/util/classgen'
require 'puppet/node/environment'
# Methods dealing with Type management. This module gets included into the
# Puppet::Type class, it's just split out here for clarity.
@@ -113,7 +114,7 @@ def type(name)
if t = @types[name]
return t
else
if typeloader.load(name)
if typeloader.load(name, env = Puppet::Node::Environment.current)
Puppet.warning "Loaded puppet/type/#{name} but no class was created" unless @types.include? name
end

1 comment on commit 96712ef

@ruworuro

This comment has been minimized.

Show comment
Hide comment
@ruworuro

ruworuro Nov 9, 2012

Works in puppet 2.7

ruworuro commented on 96712ef Nov 9, 2012

Works in puppet 2.7

Please sign in to comment.