Skip to content

Commit b9e775b

Browse files
authored
Check uninstall error is not nil when uninstalling a failed install (#159)
1 parent 525fada commit b9e775b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/client/actionclient.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ func (c *actionClient) Install(name, namespace string, chrt *chart.Chart, vals m
140140
// Only return an error about a rollback failure if the failure was
141141
// caused by something other than the release not being found.
142142
_, uninstallErr := c.Uninstall(name)
143-
if !errors.Is(uninstallErr, driver.ErrReleaseNotFound) {
143+
if uninstallErr != nil && !errors.Is(uninstallErr, driver.ErrReleaseNotFound) {
144144
return nil, fmt.Errorf("uninstall failed: %v: original install error: %w", uninstallErr, err)
145145
}
146146
}

0 commit comments

Comments
 (0)