From 83d12155e0eef9496e28764e2e524a04ac55b70b Mon Sep 17 00:00:00 2001 From: Norio Nomura Date: Wed, 10 Sep 2025 10:46:03 +0900 Subject: [PATCH] `limactl prune --keep-referred`: Do not skip template on failing `driverutil.ResolveVMType()` `locationsFromLimaYAML()` should be called on the template, which fails `driverutil.ResolveVMType()` or not. It can be assumed that `driverutil.ResolveVMType()` does not affect any locations in the template. Prioritize that there is no omission in the current locations collection rather than changing locations by `driverutil.ResolveVMType()` in the future. Signed-off-by: Norio Nomura --- cmd/limactl/prune.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cmd/limactl/prune.go b/cmd/limactl/prune.go index 6fb9aa2a3db..0baf0d826af 100644 --- a/cmd/limactl/prune.go +++ b/cmd/limactl/prune.go @@ -101,8 +101,7 @@ func knownLocations(ctx context.Context) (map[string]limatype.File, error) { return nil, err } if err := driverutil.ResolveVMType(ctx, y, t.Name); err != nil { - logrus.Warnf("failed to resolve vm for %q: %v", t.Name, err) - continue + logrus.Warnf("failed to resolve vmType for %q: %v", t.Name, err) } maps.Copy(locations, locationsFromLimaYAML(y)) }