From 4bdcb6d2fb82e24ca82c5ae561e09e8fce1d15fb Mon Sep 17 00:00:00 2001 From: Sebastien Plisson Date: Wed, 5 Dec 2018 20:10:47 -0800 Subject: [PATCH] Fix variables Signed-off-by: Sebastien Plisson --- cmd/helm/install.go | 5 +++-- cmd/helm/rollback.go | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/cmd/helm/install.go b/cmd/helm/install.go index 91a2c14c1..97e0d6054 100644 --- a/cmd/helm/install.go +++ b/cmd/helm/install.go @@ -326,13 +326,14 @@ func (i *installCmd) run() error { // If this is a dry run, we can't display status. if i.dryRun { // This is special casing to avoid breaking backward compatibility: - if res.Release.Info.Description != "Dry run complete" { - fmt.Fprintf(os.Stdout, "WARNING: %s\n", res.Release.Info.Description) + if resp.Release.Info.Description != "Dry run complete" { + fmt.Fprintf(os.Stdout, "WARNING: %s\n", resp.Release.Info.Description) } return nil } // Print the status like status command does + rel := resp.GetRelease() status, err := i.client.ReleaseStatus(rel.Name) if err != nil { return prettyError(err) diff --git a/cmd/helm/rollback.go b/cmd/helm/rollback.go index 349d71ba3..c35144eb4 100644 --- a/cmd/helm/rollback.go +++ b/cmd/helm/rollback.go @@ -94,7 +94,7 @@ func newRollbackCmd(c helm.Interface, out io.Writer) *cobra.Command { } func (r *rollbackCmd) run() error { - _, err := r.client.RollbackRelease( + resp, err := r.client.RollbackRelease( r.name, helm.RollbackDryRun(r.dryRun), helm.RollbackRecreate(r.recreate), @@ -121,7 +121,7 @@ func (r *rollbackCmd) run() error { printRelease(r.out, rel) } } - + if err != nil { return prettyError(err) }