utils/analytics: revert a test-bot analytics change.
https://github.com/Homebrew/brew/pull/17154#discussion_r1581102553 was ignored by auto-merge, whoops.
This commit is contained in:
parent
af0f115a23
commit
ecd96a2c51
@ -144,23 +144,13 @@ module Utils
|
||||
os: HOMEBREW_SYSTEM,
|
||||
}
|
||||
|
||||
command_and_package, options =
|
||||
step_command_short.split
|
||||
.partition { |arg| !arg.start_with?("-") }
|
||||
|
||||
# Strip out any flag values to reduce cardinality and preserve privacy.
|
||||
# Sort options to ensure consistent ordering and improve readability.
|
||||
options = options.join(" ")
|
||||
.split
|
||||
.join(" ")
|
||||
.split(/(-+)/)
|
||||
.map { |a| a.sub(/[ =].+/, " ") }
|
||||
.join(" ")
|
||||
.strip
|
||||
.split
|
||||
.sort
|
||||
|
||||
command = (command_and_package + options).join(" ")
|
||||
command_and_package, options =
|
||||
step_command_short.split
|
||||
.map { |arg| arg.sub(/=.*/, "=") }
|
||||
.partition { |arg| !arg.start_with?("-") }
|
||||
command = (command_and_package + options.sort).join(" ")
|
||||
|
||||
# Fields can have high cardinality.
|
||||
fields = { command: }
|
||||
|
Loading…
x
Reference in New Issue
Block a user