Increase error message specificity for name reuse

If `helm upgrade` fails because a reused name is still in use, the error
message does not specify which name is still in use. Update the error
message.
pull/4207/head^2
mattjmcnaughton 7 years ago committed by Sebastien Plisson
parent 28880a848f
commit bb5a24609c

@ -190,7 +190,7 @@ func (s *ReleaseServer) uniqName(start string, reuse bool) (string, error) {
s.Log("name %s exists but is not in use, reusing name", start)
return start, nil
} else if reuse {
return "", errors.New("cannot re-use a name that is still in use")
return "", fmt.Errorf("a released named %s is in use, cannot re-use a name that is still in use", start)
}
return "", fmt.Errorf("a release named %s already exists.\nRun: helm ls --all %s; to check the status of the release\nOr run: helm del --purge %s; to delete it", start, start, start)

Loading…
Cancel
Save