lib/puppet-debugger/support/environment.rb in puppet-debugger-0.15.2 vs lib/puppet-debugger/support/environment.rb in puppet-debugger-0.16.0

- old
+ new

@@ -15,10 +15,16 @@ def default_modules_paths dirs = [] # add the puppet-debugger directory so we can load any defined functions dirs << File.join(Puppet[:environmentpath], default_puppet_env_name, 'modules') unless Puppet[:environmentpath].empty? dirs << Puppet.settings[:basemodulepath].split(File::PATH_SEPARATOR) - dirs.flatten + dirs << bolt_modules + dirs.flatten.compact + end + + def bolt_modules + spec = Gem::Specification.latest_specs.find { |spec| spec.name.eql?('bolt') } + bolt_modules = File.join(spec.full_gem_path, 'bolt-modules') if spec end # returns all the modules paths defined in the environment def modules_paths puppet_environment.full_modulepath