Merge pull request #1727 from elliott-davis/fix_postgres_resource

Update postgresql conf resource to accept include_dir as a string as well as an array
This commit is contained in:
Adam Leff 2017-05-15 22:03:23 -04:00 committed by GitHub
commit 6ebb62dc10

View file

@ -93,7 +93,7 @@ module Inspec::Resources
def include_files(params)
include_files = params['include'] || []
include_files += params['include_if_exists'] || []
dirs = params['include_dir'] || []
dirs = Array(params['include_dir']) || []
dirs.each do |dir|
dir = File.join(@conf_dir, dir) if dir[0] != '/'
include_files += find_files(dir, depth: 1, type: 'file')