Skip to content

Commit a844d28

Browse files
committed
Fix log when deleting a vm
Arguments were in the wrong order, showing: INFO[0000] Removing /Users/nsoffer/.lima/c1 under "*.pid *.sock *.tmp" Fix argument order and clarify the code a little bit to avoid such failures in the future. Signed-off-by: Nir Soffer <[email protected]>
1 parent 5b87d2d commit a844d28

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pkg/instance/stop.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,9 @@ func StopForcibly(inst *store.Instance) {
9393
}
9494

9595
suffixesToBeRemoved := []string{".pid", ".sock", ".tmp"}
96-
logrus.Infof("Removing %s under %q", inst.Dir, strings.ReplaceAll(strings.Join(suffixesToBeRemoved, " "), ".", "*."))
96+
globPatterns := strings.ReplaceAll(strings.Join(suffixesToBeRemoved, " "), ".", "*.")
97+
logrus.Infof("Removing %s under %q", globPatterns, inst.Dir)
98+
9799
fi, err := os.ReadDir(inst.Dir)
98100
if err != nil {
99101
logrus.Error(err)

0 commit comments

Comments
 (0)