Skip to content

Commit

Permalink
Message also when isForbidden
Browse files Browse the repository at this point in the history
  • Loading branch information
feloy committed Sep 19, 2022
1 parent ee9c70f commit d0147ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/watch/watch.go
Expand Up @@ -496,7 +496,7 @@ func (o *WatchClient) CleanupDevResources(devfileObj parser.DevfileObj, componen
fmt.Fprintln(out, "Cleaning resources, please wait")
isInnerLoopDeployed, resources, err := o.deleteClient.ListResourcesToDeleteFromDevfile(devfileObj, "app", componentName, labels.ComponentDevMode)
if err != nil {
if kerrors.IsUnauthorized(err) {
if kerrors.IsUnauthorized(err) || kerrors.IsForbidden(err) {
fmt.Fprintf(out, "Error connecting to the cluster, the resources were not cleaned up.\nPlease log in again and cleanup the resource with `odo delete component`\n\n")
} else {
fmt.Fprintf(out, "Failed to delete inner loop resources: %v\n", err)
Expand Down

0 comments on commit d0147ca

Please sign in to comment.