From 50b1d038099d0a812316e5424f5e95ca6e99e263 Mon Sep 17 00:00:00 2001 From: Bhargav Nookala Date: Wed, 7 Jun 2017 16:06:43 -0700 Subject: [PATCH] :wrench: Removing chart when install is passed with --dry-run --- cmd/helm/install.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cmd/helm/install.go b/cmd/helm/install.go index f438ebe04..17b3ec140 100644 --- a/cmd/helm/install.go +++ b/cmd/helm/install.go @@ -258,6 +258,12 @@ func (i *installCmd) run() error { // If this is a dry run, we can't display status. if i.dryRun { + // If this is a dry run, we should delete the compiled chart tarball to remain idempotent. + debug("Dry run: removing compiled chart: %s\n", i.chartPath) + err := os.Remove(i.chartPath) + if err != nil { + prettyError(err) + } return nil }