aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew')
-rw-r--r--Library/Homebrew/utils/analytics.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/Library/Homebrew/utils/analytics.sh b/Library/Homebrew/utils/analytics.sh
index 37148dd43..f0ec2c46e 100644
--- a/Library/Homebrew/utils/analytics.sh
+++ b/Library/Homebrew/utils/analytics.sh
@@ -36,6 +36,13 @@ setup-analytics() {
if [[ -z "$HOMEBREW_ANALYTICS_USER_UUID" ]]
then
HOMEBREW_ANALYTICS_USER_UUID="$(uuidgen)"
+
+ if [[ -z "$HOMEBREW_ANALYTICS_USER_UUID" ]]
+ then
+ # Avoid sending bogus analytics if no UUID could be generated.
+ export HOMEBREW_NO_ANALYTICS_THIS_RUN="1"
+ return
+ fi
git config --file="$git_config_file" --replace-all homebrew.analyticsuuid "$HOMEBREW_ANALYTICS_USER_UUID"
fi