Skip to content

Commit

Permalink
Merge pull request #570 from chef/dr/fix-parse_config-crash
Browse files Browse the repository at this point in the history
bugfix: dont crash on read_file contents in parse_config
  • Loading branch information
arlimus committed Mar 22, 2016
2 parents 8b492c3 + c5f0d11 commit bf44bed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/resources/parse_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def parse_file(conf_path)
if !inspec.file(conf_path).file?
return skip_resource "Can't find file \"#{conf_path}\""
end
@content = read_file(conf_path)
@content = read_file(conf_path).to_s
if @content.empty? && inspec.file(conf_path).size > 0
return skip_resource "Can't read file \"#{conf_path}\""
end
Expand Down

0 comments on commit bf44bed

Please sign in to comment.