Skip to content
Permalink
Browse files
fix(helm): fix 'werf helm *' commands to correctly initialize namespa…
…ce; fix output

* Initialize global 'werf helm *' flags early, the same way as original helm does.
* Fix 'werf helm PLUGIN' not uses --namespace param.
* Fix 'werf helm *' commands not to print help on command failure.

Fixes #4524

Signed-off-by: Timofey Kirillov <timofey.kirillov@flant.com>
  • Loading branch information
distorhead committed Jun 10, 2022
1 parent e785c87 commit f7faaa7970798081c26e82d171beef3b6d1ebff4
Showing 1 changed file with 6 additions and 2 deletions.
@@ -41,8 +41,9 @@ func NewCmd() *cobra.Command {
actionConfig := new(action.Configuration)

cmd := &cobra.Command{
Use: "helm",
Short: "Manage application deployment with helm",
Use: "helm",
Short: "Manage application deployment with helm",
SilenceUsage: true,
}

ctx := common.GetContext()
@@ -207,6 +208,9 @@ func NewCmd() *cobra.Command {
}
}

cmd.PersistentFlags().ParseErrorsWhitelist.UnknownFlags = true
cmd.PersistentFlags().Parse(os.Args[1:])

return cmd
}

0 comments on commit f7faaa7

Please sign in to comment.