handle missing mixpanel tokens
@@ -80,6 +80,9 @@ const (
)
func (c Command) handleUserTracking() {
+ if util.MIXPANEL_SERVICE_ACCOUNT_SECRET == "" || util.MIXPANEL_PROJECT_TOKEN == "" {
+ return
+ } else {
optedIn, err := util.IsUserOptedIn()
if err != nil {
sentry.CaptureException(err)
@@ -91,6 +94,7 @@ func (c Command) handleUserTracking() {
}
}
}
+}
// AddToParent add new command to main parent cmd
// and initializes all necessary things as well as take care of errors and output
