Skip to content

Commit

Permalink
fix(helm): respect dryRun opt in DeleteRelease
Browse files Browse the repository at this point in the history
  • Loading branch information
rollulus committed Nov 15, 2016
1 parent 915769b commit 8a13be2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pkg/helm/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@ func (h *Client) InstallRelease(chstr, ns string, opts ...InstallOption) (*rls.I

// DeleteRelease uninstalls a named release and returns the response.
func (h *Client) DeleteRelease(rlsName string, opts ...DeleteOption) (*rls.UninstallReleaseResponse, error) {
// apply the uninstall options
for _, opt := range opts {
opt(&h.opts)
}

if h.opts.dryRun {
// In the dry run case, just see if the release exists
r, err := h.ReleaseContent(rlsName, nil)
Expand All @@ -98,11 +103,6 @@ func (h *Client) DeleteRelease(rlsName string, opts ...DeleteOption) (*rls.Unins
return &rls.UninstallReleaseResponse{Release: r.Release}, nil
}

// apply the uninstall options
for _, opt := range opts {
opt(&h.opts)
}

req := &h.opts.uninstallReq
req.Name = rlsName
req.DisableHooks = h.opts.disableHooks
Expand Down

0 comments on commit 8a13be2

Please sign in to comment.