fix(cmd): Fixes logging on action conf init error (#6909)

* fix(cmd): Fixes logging on action conf init error

Errors relating to initializing the action config cause helm to exit silently,
except when in debug mode. This now emits the useful error.

Closes #6863

Signed-off-by: Jorge Gasca <jorge.ignacio.gasca@gmail.com>

* Remove unnecessary formatting of err struct

Signed-off-by: Jorge Gasca <jorge.ignacio.gasca@gmail.com>
pull/7346/head
Jorge I. Gasca 5 years ago committed by Martin Hickey
parent 29cc5efc18
commit ad07bb690d

@ -68,8 +68,7 @@ func main() {
cmd := newRootCmd(actionConfig, os.Stdout, os.Args[1:]) cmd := newRootCmd(actionConfig, os.Stdout, os.Args[1:])
if err := actionConfig.Init(settings.RESTClientGetter(), settings.Namespace(), os.Getenv("HELM_DRIVER"), debug); err != nil { if err := actionConfig.Init(settings.RESTClientGetter(), settings.Namespace(), os.Getenv("HELM_DRIVER"), debug); err != nil {
debug("%+v", err) log.Fatal(err)
os.Exit(1)
} }
if err := cmd.Execute(); err != nil { if err := cmd.Execute(); err != nil {

Loading…
Cancel
Save