Skip to content

Commit ebf3017

Browse files
return error if delete fails
1 parent 070ff22 commit ebf3017

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

minikube/service/minikube_node.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,16 +63,22 @@ func (m *MinikubeNode) Add(cc *config.ClusterConfig, starter node.Starter) error
6363

6464
func (m *MinikubeNode) Delete(cc config.ClusterConfig, name string) (*config.Node, error) {
6565
node, err := node.Delete(cc, name)
66+
if err != nil {
67+
return node, err
68+
}
69+
6670
machineDir := filepath.Join(localpath.MiniPath(), "machines", name)
6771
profilesDir := filepath.Join(localpath.MiniPath(), "profiles", name)
6872
err = rmdir(machineDir)
6973
if err != nil {
7074
return node, err
7175
}
76+
7277
err = rmdir(profilesDir)
7378
if err != nil {
7479
return node, err
7580
}
81+
7682
return node, err
7783
}
7884

0 commit comments

Comments
 (0)