From 00147a16abcfa04be271495a672e4a76023efb8a Mon Sep 17 00:00:00 2001 From: Richard Hagen Date: Fri, 10 Nov 2023 11:22:10 +0100 Subject: [PATCH] hide token-env flag --- cmd/validateRadixConfig.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmd/validateRadixConfig.go b/cmd/validateRadixConfig.go index c4d1493..1a8f14d 100644 --- a/cmd/validateRadixConfig.go +++ b/cmd/validateRadixConfig.go @@ -18,6 +18,8 @@ import ( "fmt" "os" + "github.com/equinor/radix-cli/pkg/client" + "github.com/equinor/radix-cli/pkg/settings" radixv1 "github.com/equinor/radix-operator/pkg/apis/radix/v1" "github.com/equinor/radix-operator/pkg/apis/radixvalidators" "github.com/equinor/radix-operator/pkg/apis/utils" @@ -85,5 +87,7 @@ func init() { validateCmd.AddCommand(validateRadixConfigCmd) validateRadixConfigCmd.Flags().StringP("config-file", "f", "radixconfig.yaml", "Name of the radixconfig file. Defaults to radixconfig.yaml in current directory") validateRadixConfigCmd.Flags().BoolP("print", "p", false, "Print parsed config file") - setVerbosePersistentFlag(validateRadixConfigCmd) + + validateRadixConfigCmd.Flags().Bool(settings.TokenEnvironmentOption, false, fmt.Sprintf("Take the token from environment variable %s", client.TokenEnvironmentName)) + validateRadixConfigCmd.Flags().MarkHidden(settings.TokenEnvironmentOption) }