Skip to content

Commit 6eaf881

Browse files
committed
fix error in custom fact resolution when conf file is empty
1 parent feea1ec commit 6eaf881

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/facter/es_facts.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ def self.run
5050

5151
if File.readable?("#{dir_prefix}/elasticsearch.yml")
5252
config_data = YAML.load_file("#{dir_prefix}/elasticsearch.yml")
53+
return unless config_data
54+
5355
httpport, ssl = get_httpport(config_data)
5456
end
5557

0 commit comments

Comments
 (0)