mirror of
https://github.com/inspec/inspec
synced 2025-02-17 14:38:43 +00:00
Merge pull request #570 from chef/dr/fix-parse_config-crash
bugfix: dont crash on read_file contents in parse_config
This commit is contained in:
commit
bf44bed7a7
1 changed files with 1 additions and 1 deletions
|
@ -47,7 +47,7 @@ module Inspec::Resources
|
|||
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
|
||||
|
|
Loading…
Add table
Reference in a new issue