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