Merge pull request #1527 from rollulus/fix-delete-dry-run

fix(helm): respect dryRun opt in DeleteRelease
pull/1560/head
Matt Butcher 8 years ago committed by GitHub
commit 50beadbe8e

@ -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