Hide --azure-container-registry-config flag (#445)

ACR is not supported and the flag is a side-effect of vendoring.
The ACR credentials pkg uses pflag.String directly.
This commit is contained in:
Adrian Duong 2018-11-13 07:50:55 -08:00 committed by dlorenc
parent 8408c53aa8
commit e7d1123073
1 changed files with 3 additions and 2 deletions

View File

@ -33,6 +33,7 @@ import (
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
)
var (
@ -114,9 +115,9 @@ func addKanikoOptionsFlags(cmd *cobra.Command) {
// addHiddenFlags marks certain flags as hidden from the executor help text
func addHiddenFlags(cmd *cobra.Command) {
// This flag is added in a vendored directory, hide so that it doesn't come up via --help
RootCmd.PersistentFlags().MarkHidden("azure-container-registry-config")
pflag.CommandLine.MarkHidden("azure-container-registry-config")
// Hide this flag as we want to encourage people to use the --context flag instead
RootCmd.PersistentFlags().MarkHidden("bucket")
cmd.PersistentFlags().MarkHidden("bucket")
}
func checkContained() bool {