Skip to content

Commit

Permalink
return error if delete fails
Browse files Browse the repository at this point in the history
  • Loading branch information
scott-the-programmer committed Oct 14, 2022
1 parent 070ff22 commit ebf3017
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions minikube/service/minikube_node.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,22 @@ func (m *MinikubeNode) Add(cc *config.ClusterConfig, starter node.Starter) error

func (m *MinikubeNode) Delete(cc config.ClusterConfig, name string) (*config.Node, error) {
node, err := node.Delete(cc, name)
if err != nil {
return node, err
}

machineDir := filepath.Join(localpath.MiniPath(), "machines", name)
profilesDir := filepath.Join(localpath.MiniPath(), "profiles", name)
err = rmdir(machineDir)
if err != nil {
return node, err
}

err = rmdir(profilesDir)
if err != nil {
return node, err
}

return node, err
}

Expand Down

0 comments on commit ebf3017

Please sign in to comment.