Skip to content

Commit

Permalink
duplicate error display is removed
Browse files Browse the repository at this point in the history
  • Loading branch information
mikebz committed Oct 7, 2020
1 parent 7b22fba commit dead45b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,9 @@ kpt/kpt

# Emacs temp files
*~

# VS Code individual configurations
.vscode/

# local tmp directory (in case you download packages here)
tmp/
3 changes: 1 addition & 2 deletions commands/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ func GetAnthosCommands(name string) []*cobra.Command {

// NormalizeCommand will modify commands to be consistent, e.g. silencing errors
func NormalizeCommand(c ...*cobra.Command) {
for i := range c {
cmd := c[i]
for _, cmd := range c {
cmd.Short = strings.TrimPrefix(cmd.Short, "[Alpha] ")
NormalizeCommand(cmd.Commands()...)
}
Expand Down
1 change: 1 addition & 0 deletions commands/configcmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ func SetCommand(parent string) *cobra.Command {
kustomizeCmd.Long = cfgdocs.SetShort + "\n" + cfgdocs.SetLong
kustomizeCmd.Example = cfgdocs.SetExamples
kustomizeCmd.SilenceUsage = true
kustomizeCmd.SilenceErrors = true
var autoRun bool
setCmd.Flags().BoolVar(&autoRun, "auto-run", true,
`Automatically run functions after setting (if enabled for the package)`)
Expand Down

0 comments on commit dead45b

Please sign in to comment.