diff --git a/Library/Homebrew/utils/analytics.rb b/Library/Homebrew/utils/analytics.rb index eea5d8fe18..f2163355bf 100644 --- a/Library/Homebrew/utils/analytics.rb +++ b/Library/Homebrew/utils/analytics.rb @@ -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