Skip to content

Commit

Permalink
Fixes the problem of non existent uri folder when all flag is used in…
Browse files Browse the repository at this point in the history
… the delete command
  • Loading branch information
mik-dass committed Sep 17, 2021
1 parent 9e98024 commit b20ee06
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/odo/cli/component/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -271,11 +271,11 @@ func (do *DeleteOptions) DevFileRun() (err error) {
}

empty, err := util.IsEmpty(filepath.Join(do.componentContext, service.UriFolder))
if err != nil {
if err != nil && !os.IsNotExist(err) {
return err
}

if empty {
if !os.IsNotExist(err) && empty {
err = os.RemoveAll(filepath.Join(do.componentContext, service.UriFolder))
if err != nil {
return err
Expand Down

0 comments on commit b20ee06

Please sign in to comment.