bugfix: make sure version is always a string

This commit is contained in:
Dominik Richter 2016-02-22 04:14:31 +01:00 committed by Stephan Renatus
parent a2f66273da
commit 1147d30679

View file

@ -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