diff --git a/cmd/helm/helm.go b/cmd/helm/helm.go index 1ee6242e9..08ef80405 100644 --- a/cmd/helm/helm.go +++ b/cmd/helm/helm.go @@ -76,8 +76,7 @@ func main() { if settings.KubeConfig != "" { // If KubeConfig path is not empty, backup kube config to: /kubeconfig // When the backup is successful, the settings.KubeConfig path is updated to backup file's path. - err = settings.BackupKubeConfig() - if err != nil { + if err := settings.BackupKubeConfig(); err != nil { log.Fatal(err) } } else {