Merge pull request #13836 from flouthoc/machine-rm-ignore-enoent

machine,rm: Ignore `ENOENT` while cleaning machine paths
This commit is contained in:
OpenShift Merge Robot
2022-04-12 09:13:41 -04:00
committed by GitHub

View File

@ -859,6 +859,9 @@ func (v *MachineVM) Remove(_ string, opts machine.RemoveOptions) (string, func()
return confirmationMessage, func() error {
for _, f := range files {
if err := os.Remove(f); err != nil {
if errors.Is(err, os.ErrNotExist) {
continue
}
logrus.Error(err)
}
}