diff --git a/cmd/root.go b/cmd/root.go index 0f0b94ebd7..4740605a8c 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -243,6 +243,9 @@ func Execute() { teleReport.InstallationUUID = teleMeta.UUID } // default to false on errors } + if teleCommand == "tiup __complete" { + reportEnabled = false + } if reportEnabled { teleReport.EventUUID = eventUUID diff --git a/components/cluster/command/root.go b/components/cluster/command/root.go index 82ad9319db..13190ad3b6 100644 --- a/components/cluster/command/root.go +++ b/components/cluster/command/root.go @@ -112,7 +112,9 @@ func init() { tidbSpec = spec.GetSpecManager() cm = manager.NewManager("tidb", tidbSpec, spec.TiDBComponentVersion, log) - logger.EnableAuditLog(spec.AuditDir()) + if cmd.Name() != "__complete" { + logger.EnableAuditLog(spec.AuditDir()) + } // Running in other OS/ARCH Should be fine we only download manifest file. env, err = tiupmeta.InitEnv(repository.Options{