fix(helm): respect dryRun opt in DeleteRelease

pull/1527/head
Rollulus 8 years ago
parent 915769b311
commit 8a13be29ac

@ -89,6 +89,11 @@ func (h *Client) InstallRelease(chstr, ns string, opts ...InstallOption) (*rls.I
// DeleteRelease uninstalls a named release and returns the response. // DeleteRelease uninstalls a named release and returns the response.
func (h *Client) DeleteRelease(rlsName string, opts ...DeleteOption) (*rls.UninstallReleaseResponse, error) { 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 { if h.opts.dryRun {
// In the dry run case, just see if the release exists // In the dry run case, just see if the release exists
r, err := h.ReleaseContent(rlsName, nil) 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 return &rls.UninstallReleaseResponse{Release: r.Release}, nil
} }
// apply the uninstall options
for _, opt := range opts {
opt(&h.opts)
}
req := &h.opts.uninstallReq req := &h.opts.uninstallReq
req.Name = rlsName req.Name = rlsName
req.DisableHooks = h.opts.disableHooks req.DisableHooks = h.opts.disableHooks

Loading…
Cancel
Save