summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-04-12 09:13:41 -0400
committerGitHub <noreply@github.com>2022-04-12 09:13:41 -0400
commit9822c46981226c3296b5ad7833d8937cfc3ece49 (patch)
treeec9a7aa37737581e4134da2c068b0f77ce3987a1
parentb8693f97d3abd15e8d0502bc82b85286d5d3535e (diff)
parent8fb9dbdb4e194b2aa4b20b7ea16d1d21393bbaa3 (diff)
downloadpodman-9822c46981226c3296b5ad7833d8937cfc3ece49.tar.gz
podman-9822c46981226c3296b5ad7833d8937cfc3ece49.tar.bz2
podman-9822c46981226c3296b5ad7833d8937cfc3ece49.zip
Merge pull request #13836 from flouthoc/machine-rm-ignore-enoent
machine,rm: Ignore `ENOENT` while cleaning machine paths
-rw-r--r--pkg/machine/qemu/machine.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/pkg/machine/qemu/machine.go b/pkg/machine/qemu/machine.go
index e849bae3f..321c1b99c 100644
--- a/pkg/machine/qemu/machine.go
+++ b/pkg/machine/qemu/machine.go
@@ -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)
}
}