diff --git a/lib/inspec/metadata.rb b/lib/inspec/metadata.rb index f22a68edd..3accbb99c 100644 --- a/lib/inspec/metadata.rb +++ b/lib/inspec/metadata.rb @@ -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?