summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJesse Wolfe <jes5199@gmail.com>2010-07-06 17:47:21 -0700
committerMarkus Roberts <Markus@reality.com>2010-07-06 23:57:58 -0700
commita0ea74b5e8882e3f4e5cb1a1c396581e5484000e (patch)
tree0277690b20759fdbe35ad810c73b0963ad95ded6 /lib
parent7978be59090b0bb25c2bc29ecb16ade33a8f50f6 (diff)
downloadpuppet-a0ea74b5e8882e3f4e5cb1a1c396581e5484000e.tar.gz
puppet-a0ea74b5e8882e3f4e5cb1a1c396581e5484000e.tar.xz
puppet-a0ea74b5e8882e3f4e5cb1a1c396581e5484000e.zip
[#4149] Don't create two Resource::TypeCollections
By asking the environment for known resources instead of creating a type collection ourselves, we avoid accidentally creating two Resource::TypeCollection objects.
Diffstat (limited to 'lib')
-rw-r--r--lib/puppet/application/apply.rb2
-rw-r--r--lib/puppet/application/master.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/puppet/application/apply.rb b/lib/puppet/application/apply.rb
index 8909939dc..1814858b0 100644
--- a/lib/puppet/application/apply.rb
+++ b/lib/puppet/application/apply.rb
@@ -67,7 +67,7 @@ class Puppet::Application::Apply < Puppet::Application
Puppet[:manifest] = command_line.args.shift
end
begin
- Puppet::Resource::TypeCollection.new(Puppet[:environment]).perform_initial_import
+ Puppet::Node::Environment.new(Puppet[:environment]).known_resource_types
rescue => detail
Puppet.err detail
exit 1
diff --git a/lib/puppet/application/master.rb b/lib/puppet/application/master.rb
index fdcd7d34f..484ec08ca 100644
--- a/lib/puppet/application/master.rb
+++ b/lib/puppet/application/master.rb
@@ -67,7 +67,7 @@ class Puppet::Application::Master < Puppet::Application
def parseonly
begin
- Puppet::Resource::TypeCollection.new(Puppet[:environment]).perform_initial_import
+ Puppet::Node::Environment.new(Puppet[:environment]).known_resource_types
rescue => detail
Puppet.err detail
exit 1