summaryrefslogtreecommitdiffhomepage
path: root/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cmd')
-rw-r--r--cmd/tailscale/cli/cli.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/cmd/tailscale/cli/cli.go b/cmd/tailscale/cli/cli.go
index 7cc4e2778..adf1e90f2 100644
--- a/cmd/tailscale/cli/cli.go
+++ b/cmd/tailscale/cli/cli.go
@@ -129,6 +129,13 @@ func Run(args []string) error {
if len(args) == 1 && (args[0] == "-V" || args[0] == "--version") {
args = []string{"version"}
}
+ if runtime.GOOS == "linux" && distro.Get() == distro.Gokrazy && len(args) == 0 &&
+ os.Getenv("GOKRAZY_FIRST_START") == "1" {
+ // Exit with 125 otherwise the CLI binary is restarted
+ // forever in a loop by the Gokrazy process supervisor.
+ // See https://gokrazy.org/userguide/process-interface/
+ os.Exit(125)
+ }
var warnOnce sync.Once
tailscale.SetVersionMismatchHandler(func(clientVer, serverVer string) {