From 48c9c35274f69d176e1c607f16f640d634d8219c Mon Sep 17 00:00:00 2001 From: Jan Guth Date: Fri, 8 May 2026 12:37:52 +0200 Subject: [PATCH] fix(preset): disable tilt analytics during version check tilt's analytics init calls getent which isn't available in the clean env that b uses for binary execution. This made 'tilt version' fail with exit code 1, leaving VersionLocalF unable to report the installed version. Set TILT_DISABLE_ANALYTICS=1 in the version check (same pattern as k9s setting K9S_LOGS_DIR and argocd/packer setting HOME). Co-Authored-By: Claude Opus 4.6 (1M context) --- pkg/binaries/tilt/tilt.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkg/binaries/tilt/tilt.go b/pkg/binaries/tilt/tilt.go index b6bcd9b..b47bdc7 100644 --- a/pkg/binaries/tilt/tilt.go +++ b/pkg/binaries/tilt/tilt.go @@ -33,6 +33,13 @@ func Binary(options *binaries.BinaryOptions) *binary.Binary { VersionF: binary.GithubLatest, IsTarGz: true, VersionLocalF: func(b *binary.Binary) (string, error) { + // tilt's analytics init calls getent which may not be in + // the clean env. Disable analytics so the version check + // doesn't fail on minimal environments. + if b.Envs == nil { + b.Envs = map[string]string{} + } + b.Envs["TILT_DISABLE_ANALYTICS"] = "1" s, err := b.Exec("version") if err != nil { return "", err