Fixes: #13301 ("machine rm removes the mounted socket file on macos")

[NO NEW TESTS NEEDED]
Signed-off-by: Thibault Gagnaux <tgagnaux@gmail.com>
This commit is contained in:
Thibault Gagnaux
2022-03-06 15:32:47 +01:00
parent f4d6e87772
commit 01514f33ba

View File

@ -667,6 +667,11 @@ func (v *MachineVM) Remove(name string, opts machine.RemoveOptions) (string, fun
if !opts.SaveImage {
files = append(files, v.ImagePath)
}
socketPath, err := v.getForwardSocketPath()
if err != nil {
logrus.Error(err)
}
files = append(files, socketPath)
files = append(files, v.archRemovalFiles()...)
if err := machine.RemoveConnection(v.Name); err != nil {