Skip to content

Commit aa98389

Browse files
authored
Merge pull request #1140 from fe80/fe80/fix_raise_fact
fix error in custom fact resolution when conf file is empty
2 parents 0513ddc + 6eaf881 commit aa98389

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)