From f5b6a90fd0f5610f581834cfee6569688992d623 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Mon, 18 May 2020 08:50:51 +0100 Subject: [PATCH] utils/analytics: fix options reporting. Check we have a non-empty `options` and convert them all to human readable strings. --- Library/Homebrew/utils/analytics.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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