mirror of
https://github.com/inspec/inspec
synced 2024-11-23 21:23:29 +00:00
dont crash on empty metadata during finalize
This commit is contained in:
parent
0fb1b7d70d
commit
7cdb710e5e
1 changed files with 1 additions and 0 deletions
|
@ -140,6 +140,7 @@ module Inspec
|
|||
end
|
||||
|
||||
def self.finalize(metadata, profile_id)
|
||||
return nil if metadata.nil?
|
||||
param = metadata.params || {}
|
||||
param['name'] = profile_id.to_s unless profile_id.to_s.empty?
|
||||
param['version'] = param['version'].to_s unless param['version'].nil?
|
||||
|
|
Loading…
Reference in a new issue