lib/puppet-debugger/support.rb in puppet-debugger-1.2.0 vs lib/puppet-debugger/support.rb in puppet-debugger-1.3.0
- old
+ new
@@ -148,11 +148,16 @@
begin
require 'bolt/logger'
require 'bolt/puppetdb'
require 'bolt/puppetdb/client'
require 'bolt/puppetdb/config'
- config = Bolt::PuppetDB::Config.load_config({})
- Bolt::PuppetDB::Client.new(config)
+ if Bolt::PuppetDB::Config.respond_to?(:default_config)
+ config = Bolt::PuppetDB::Config.default_config
+ Bolt::PuppetDB::Client.new(config: config)
+ else
+ config = Bolt::PuppetDB::Config.load_config({})
+ Bolt::PuppetDB::Client.new(config)
+ end
rescue LoadError
# not puppet 6+
nil
end
end