mirror of
https://github.com/inspec/inspec
synced 2025-02-17 06:28:40 +00:00
bugfix: handle empty parseconfig options
This commit is contained in:
parent
69be6acae8
commit
03fe892899
1 changed files with 4 additions and 4 deletions
|
@ -16,9 +16,9 @@
|
|||
class PConfig < Inspec.resource(1)
|
||||
name 'parse_config'
|
||||
|
||||
def initialize(content = nil, useropts = {})
|
||||
default_options = {}
|
||||
@opts = default_options.merge(useropts)
|
||||
def initialize(content = nil, useropts = nil)
|
||||
@opts = {}
|
||||
@opts = useropts.dup unless useropts.nil?
|
||||
@files_contents = {}
|
||||
@params = nil
|
||||
|
||||
|
@ -64,7 +64,7 @@ end
|
|||
class PConfigFile < PConfig
|
||||
name 'parse_config_file'
|
||||
|
||||
def initialize(path, opts)
|
||||
def initialize(path, opts = nil)
|
||||
super(nil, opts)
|
||||
parse_file(path)
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue