vendored/puppet/lib/puppet/application/lookup.rb in bolt-0.23.0 vs vendored/puppet/lib/puppet/application/lookup.rb in bolt-0.24.0
- old
+ new
@@ -351,10 +351,10 @@
if fact_file
if fact_file.end_with?("json")
given_facts = Puppet::Util::Json.load(Puppet::FileSystem.read(fact_file, :encoding => 'utf-8'))
else
- given_facts = YAML.load(Puppet::FileSystem.read(fact_file, :encoding => 'utf-8'))
+ given_facts = Puppet::Util::Yaml.safe_load_file(fact_file)
end
unless given_facts.instance_of?(Hash)
raise _("Incorrect formatted data in %{fact_file} given via the --facts flag") % { fact_file: fact_file }
end