mirror of
https://github.com/inspec/inspec
synced 2024-11-14 17:07:09 +00:00
bugfix: make sure version is always a string
This commit is contained in:
parent
a2f66273da
commit
1147d30679
1 changed files with 4 additions and 2 deletions
|
@ -140,8 +140,10 @@ module Inspec
|
|||
end
|
||||
|
||||
def self.finalize(metadata, profile_id)
|
||||
metadata.params['name'] = profile_id.to_s unless profile_id.to_s.empty?
|
||||
metadata.params = symbolize_keys(metadata.params || {})
|
||||
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?
|
||||
metadata.params = symbolize_keys(param)
|
||||
metadata
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue