Fix err checking

pull/3052/head
Alexander Lukyanchenko 7 years ago
parent 3171f89e48
commit 6f6d46de06

@ -153,7 +153,7 @@ func (u *upgradeCmd) run() error {
// inside of the grpc.rpcError message. // inside of the grpc.rpcError message.
releaseHistory, err := u.client.ReleaseHistory(u.release, helm.WithMaxHistory(1)) releaseHistory, err := u.client.ReleaseHistory(u.release, helm.WithMaxHistory(1))
if err != nil { if err == nil {
previousReleaseNamespace := releaseHistory.Releases[0].Namespace previousReleaseNamespace := releaseHistory.Releases[0].Namespace
if previousReleaseNamespace != u.namespace { if previousReleaseNamespace != u.namespace {
fmt.Fprintf(u.out, "WARNING: Namespace doesn't match with previous. Release will be deployed to %s\n", previousReleaseNamespace) fmt.Fprintf(u.out, "WARNING: Namespace doesn't match with previous. Release will be deployed to %s\n", previousReleaseNamespace)

Loading…
Cancel
Save