Skip to content

Commit

Permalink
fix(analytics): check do not track (#4329)
Browse files Browse the repository at this point in the history
Our do not track check was wrong and always returning true.
This is why we were getting nothing.
  • Loading branch information
julienrbrt authored Aug 29, 2024
1 parent 08e061a commit e04d0f6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ignite/internal/analytics/analytics.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,10 @@ func SendMetric(wg *sync.WaitGroup, cmd *cobra.Command) {
// checkDNT check if the user allow to track data or if the DO_NOT_TRACK
// env var is set https://consoledonottrack.com/
func checkDNT() (anonIdentity, error) {
if dnt, err := strconv.ParseBool(os.Getenv(envDoNotTrack)); err != nil || dnt {
return anonIdentity{DoNotTrack: true}, nil
if dnt := os.Getenv(envDoNotTrack); dnt != "" {
if dnt, err := strconv.ParseBool(dnt); err != nil || dnt {
return anonIdentity{DoNotTrack: true}, nil
}
}

globalPath, err := config.DirPath()
Expand Down

0 comments on commit e04d0f6

Please sign in to comment.