utils/analytics: fix options reporting.

Check we have a non-empty `options` and convert them all to human
readable strings.
This commit is contained in:
Mike McQuaid 2020-05-18 08:50:51 +01:00
parent 9fcaa46cdf
commit f5b6a90fd0
No known key found for this signature in database
GPG Key ID: 48A898132FD8EE70

View File

@ -67,8 +67,8 @@ module Utils
return if exception.formula.tap.private?
action = exception.formula.full_name
if (options = exception.options&.to_a&.join(" "))
action = "#{action} #{options}".strip
if (options = exception.options.to_a.presence)
action = "#{action} #{options.map(&:to_s).join(" ")}".strip
end
report_event("BuildError", action)
end