diff --git a/cmd/review-bot/main.go b/cmd/review-bot/main.go index bc1f192..d84afb3 100644 --- a/cmd/review-bot/main.go +++ b/cmd/review-bot/main.go @@ -85,8 +85,9 @@ func main() { aicoreResourceGroup := flag.String("aicore-resource-group", envOrDefault("AICORE_RESOURCE_GROUP", "default"), "SAP AI Core resource group (for provider=aicore)") // Backward-compatible alias: --gitea-url shares vcsURL's pointer (last flag wins). - // Shares vcsURL pointer; empty default avoids ordering dependency with vcsURL declaration. - flag.StringVar(vcsURL, "gitea-url", "", "Deprecated: use --vcs-url instead") + // Must use *vcsURL as default: StringVar sets *p=value at registration, so empty + // string would overwrite the env-resolved value from the --vcs-url declaration. + flag.StringVar(vcsURL, "gitea-url", *vcsURL, "Deprecated: use --vcs-url instead") flag.Parse()