summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMarkus Roberts <Markus@reality.com>2010-07-25 22:14:31 -0700
committerMarkus Roberts <Markus@reality.com>2010-07-25 22:24:49 -0700
commit760e418d254a8d2198d2c6eb466d783a5930ef47 (patch)
tree16fd3ef776adc3d23e56528fea33aea1713542ee /lib
parent67bdf89ac91a753171ad354b070546c62e09ce1a (diff)
downloadpuppet-760e418d254a8d2198d2c6eb466d783a5930ef47.tar.gz
puppet-760e418d254a8d2198d2c6eb466d783a5930ef47.tar.xz
puppet-760e418d254a8d2198d2c6eb466d783a5930ef47.zip
Fix #4349 - Parsing with ignoreimport=true was always loading site.pp
With the type collection refactoring, when accessing a fresh collection puppet tries to import the site.pp manifest (perfrom_initial_import). In the case of puppetdoc, we are parsing site.pp by ourselves, so we ended parsing it twice, resulting in an "import loop detected" error. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/puppet/resource/type_collection.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/puppet/resource/type_collection.rb b/lib/puppet/resource/type_collection.rb
index 6a933362f..90b6df9c1 100644
--- a/lib/puppet/resource/type_collection.rb
+++ b/lib/puppet/resource/type_collection.rb
@@ -153,6 +153,7 @@ class Puppet::Resource::TypeCollection
end
def perform_initial_import
+ return if Puppet.settings[:ignoreimport]
parser = Puppet::Parser::Parser.new(environment)
if code = Puppet.settings.uninterpolated_value(:code, environment.to_s) and code != ""
parser.string = code