aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd
diff options
context:
space:
mode:
authorAndrew Janke2016-04-26 04:28:38 -0400
committerAndrew Janke2016-04-26 04:28:38 -0400
commit05efd70dc350bf60c47d25d1d48da188ffb504df (patch)
tree7360f602e8bc7258f7845d9423156f7e19dafa67 /Library/Homebrew/cmd
parent7aaaf9d8dbfd3c8dc7045de434f8f79206922164 (diff)
downloadbrew-05efd70dc350bf60c47d25d1d48da188ffb504df.tar.bz2
Analytics: Separate user-supplied and internal-use DISABLE_ANALYTICS (#155)
This prevents `brew` self-calls from interacting with the stickiness of HOMEBREW_NO_ANALYTICS being persisted to the brew repo and accidentally disabling analytics permanently when it should have been for just one run, while restoring the stickiness of an explicit user-supplied HOMEBREW_NO_ANALYTICS.
Diffstat (limited to 'Library/Homebrew/cmd')
-rw-r--r--Library/Homebrew/cmd/tests.rb2
-rw-r--r--Library/Homebrew/cmd/update-report.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/Library/Homebrew/cmd/tests.rb b/Library/Homebrew/cmd/tests.rb
index 5ec841773..c1d01ca11 100644
--- a/Library/Homebrew/cmd/tests.rb
+++ b/Library/Homebrew/cmd/tests.rb
@@ -3,7 +3,7 @@ require "fileutils"
module Homebrew
def tests
(HOMEBREW_LIBRARY/"Homebrew/test").cd do
- ENV["HOMEBREW_NO_ANALYTICS"] = "1"
+ ENV["HOMEBREW_NO_ANALYTICS_THIS_RUN"] = "1"
ENV["TESTOPTS"] = "-v" if ARGV.verbose?
ENV["HOMEBREW_NO_COMPAT"] = "1" if ARGV.include? "--no-compat"
if ARGV.include? "--coverage"
diff --git a/Library/Homebrew/cmd/update-report.rb b/Library/Homebrew/cmd/update-report.rb
index 9d0377cb5..53b9d639a 100644
--- a/Library/Homebrew/cmd/update-report.rb
+++ b/Library/Homebrew/cmd/update-report.rb
@@ -18,7 +18,7 @@ module Homebrew
analytics_disabled = \
Utils.popen_read("git", "config", "--local", "--get", "homebrew.analyticsdisabled").chuzzle
if analytics_message_displayed != "true" && analytics_disabled != "true"
- ENV["HOMEBREW_NO_ANALYTICS"] = "1"
+ ENV["HOMEBREW_NO_ANALYTICS_THIS_RUN"] = "1"
ohai "Homebrew has enabled anonymous aggregate user behaviour analytics"
puts "Read the analytics documentation (and how to opt-out) here:"
puts " https://git.io/brew-analytics"