Correct Error messages in outdated Cmd

Signed-off-by: Emanuel Bennici <eb@fabmation.de>
pull/7021/head
Emanuel Bennici 6 years ago
parent 16189a4e43
commit 72cd4d38e5
No known key found for this signature in database
GPG Key ID: 17FA2D56BAD01661

@ -104,7 +104,8 @@ func newOutdatedListWriter(releases []*release.Release, cfg *action.Configuratio
index, err := initSearch(out, &searchRepo) index, err := initSearch(out, &searchRepo)
if err != nil { if err != nil {
// TODO: Find a better way to exit // TODO: Find a better way to exit
fmt.Errorf("%w", errors.Wrap(err, "ERROR: Could not initialize search index.")) fmt.Fprintf(out, "%s", errors.Wrap(err, "ERROR: Could not initialize search index").Error())
os.Exit(1)
} }
results := index.All() results := index.All()
@ -112,7 +113,8 @@ func newOutdatedListWriter(releases []*release.Release, cfg *action.Configuratio
// search if it exists a newer Chart in the Chart-Repository // search if it exists a newer Chart in the Chart-Repository
repoResult, err := searchChart(results, r.Name) repoResult, err := searchChart(results, r.Name)
if err != nil { if err != nil {
fmt.Errorf("%w", errors.Wrap(err, "ERROR: Could not initialize search index.")) fmt.Fprintf(out, "%s", errors.Wrap(err, "ERROR: Could not initialize search index").Error())
os.Exit(1)
} }
outdated = append(outdated, outdatedElement{ outdated = append(outdated, outdatedElement{

Loading…
Cancel
Save