Commit 8a13be29 authored by Rollulus's avatar Rollulus

fix(helm): respect dryRun opt in DeleteRelease

parent 915769b3
......@@ -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)
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment