diff options
Diffstat (limited to 'lib/puppet/parser/interpreter.rb')
-rw-r--r-- | lib/puppet/parser/interpreter.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/puppet/parser/interpreter.rb b/lib/puppet/parser/interpreter.rb index 19d61c276..9a7cc7dc5 100644 --- a/lib/puppet/parser/interpreter.rb +++ b/lib/puppet/parser/interpreter.rb @@ -89,6 +89,18 @@ module Puppet raise Puppet::DevError, "You must provide code or a manifest" end + # If they passed us a file, then make sure that the file's + # directory is in our search path. + if @file + Puppet::Parser::Parser.libsetup + + dir = File.dirname(@file) + unless Puppet[:lib].include?(dir) + Puppet.debug "Adding %s to library path" % dir + Puppet[:lib] << dir + end + end + @lastchecked = 0 if hash.include?(:UseNodes) |