Skip to content
Snippets Groups Projects
Unverified Commit f1427144 authored by Issy Long's avatar Issy Long Committed by GitHub
Browse files

Merge pull request #9312 from issyl0/unbottled-fail-nicely-if-HOMEBREW_NO_ANALYTICS

dev-cmd/unbottled: Fail nicely if `HOMEBREW_NO_ANALYTICS` is set
parents d7f03bc2 ca999a81
No related branches found
No related tags found
No related merge requests found
......@@ -86,6 +86,13 @@ module Homebrew
ohai "Getting analytics data..."
analytics = Utils::Analytics.formulae_brew_sh_json("analytics/install/90d.json")
if analytics.blank?
raise UsageError,
"default sort by analytics data requires " \
"`HOMEBREW_NO_GITHUB_API` and `HOMEBREW_NO_ANALYTICS` to be unset"
end
formulae = analytics["items"].map do |i|
f = i["formula"].split.first
next if f.include?("/")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment