From 3f850bc71388af9694c7ef19045bc3921680d3d5 Mon Sep 17 00:00:00 2001 From: SpencerSwagger <51152244+spencerswagger@users.noreply.github.com> Date: Mon, 9 Mar 2026 08:09:15 +0800 Subject: [PATCH] fix(docker): remove gateway config check, unnecessary anymore (#88) --- cmd/gateway.go | 31 ------------------------------- 1 file changed, 31 deletions(-) diff --git a/cmd/gateway.go b/cmd/gateway.go index 42e6841a..eacd86fc 100644 --- a/cmd/gateway.go +++ b/cmd/gateway.go @@ -63,37 +63,6 @@ func runGateway() { os.Exit(1) } - // Auto-detect: if no provider API key is configured, help the user. - // Also trigger auto-onboard when config file doesn't exist (first run), - // even if env vars provide API keys — DB seeding is required. - _, cfgStatErr := os.Stat(cfgPath) - configMissing := os.IsNotExist(cfgStatErr) - if !cfg.HasAnyProvider() || configMissing { - // Docker / CI: env vars provide API keys → non-interactive auto-onboard. - if canAutoOnboard() { - if runAutoOnboard(cfgPath) { - cfg, _ = config.Load(cfgPath) - } else { - os.Exit(1) - } - } else if _, statErr := os.Stat(cfgPath); statErr == nil { - // Config file exists — user already onboarded but forgot to source .env.local. - envPath := filepath.Join(filepath.Dir(cfgPath), ".env.local") - fmt.Println("No AI provider API key found. Did you forget to load your secrets?") - fmt.Println() - fmt.Printf(" source %s && ./goclaw\n", envPath) - fmt.Println() - fmt.Println("Or re-run the setup wizard: ./goclaw onboard") - os.Exit(1) - } else { - // No config file at all → first time, redirect to onboard wizard. - fmt.Println("No configuration found. Starting setup wizard...") - fmt.Println() - runOnboard() - return - } - } - // Create core components msgBus := bus.New()