From d309145290690149ac04a9da056ba6086040cdb9 Mon Sep 17 00:00:00 2001 From: Emil Date: Mon, 3 Aug 2026 03:05:55 +0300 Subject: [PATCH] Set the agent version before dispatching the setup wizard --- coordinator/cmd/worker-agent/main.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/coordinator/cmd/worker-agent/main.go b/coordinator/cmd/worker-agent/main.go index 28875ad..b107428 100644 --- a/coordinator/cmd/worker-agent/main.go +++ b/coordinator/cmd/worker-agent/main.go @@ -27,6 +27,10 @@ import ( var version = "dev" func main() { + // The wizard and --check need the injected build version too (they resolve + // the release wheel matching this binary), so it is set before dispatch. + agent.Version = version + if len(os.Args) > 1 && os.Args[1] == "setup" { os.Exit(runSetup(os.Args[2:])) } @@ -38,8 +42,6 @@ func main() { checkURL := fs.String("coordinator-url", "", "coordinator URL to probe in --check mode") _ = fs.Parse(os.Args[1:]) - agent.Version = version - if *showVersion { fmt.Println("worker-agent " + version) return