mirror of
https://github.com/inspec/inspec
synced 2024-11-10 15:14:23 +00:00
Merge pull request #500 from chef/dr/metadata-bug
don't crash on empty metadata during finalize
This commit is contained in:
commit
5d10c2208b
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