On Jul 6, 2010, at 17:56, Jesse Wolfe <[email protected]> wrote: > By asking the environment for known resources instead of creating a type > collection ourselves, we avoid accidentally creating two > Resource::TypeCollection objects. > > Signed-off-by: Jesse Wolfe <[email protected]> > --- > lib/puppet/application/apply.rb | 2 +- > lib/puppet/application/master.rb | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/lib/puppet/application/apply.rb b/lib/puppet/application/apply.rb > index 8909939..1814858 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
Isn't this the same as calling Env.new with no arguments? > rescue => detail > Puppet.err detail > exit 1 > diff --git a/lib/puppet/application/master.rb > b/lib/puppet/application/master.rb > index fdcd7d3..484ec08 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 > -- > 1.7.0.4 > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Developers" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/puppet-dev?hl=en. > -- You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en.
