Skip to content

Commit 83d1215

Browse files
committed
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 <norio.nomura@gmail.com>
1 parent 48b8439 commit 83d1215

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

cmd/limactl/prune.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,7 @@ func knownLocations(ctx context.Context) (map[string]limatype.File, error) {
101101
return nil, err
102102
}
103103
if err := driverutil.ResolveVMType(ctx, y, t.Name); err != nil {
104-
logrus.Warnf("failed to resolve vm for %q: %v", t.Name, err)
105-
continue
104+
logrus.Warnf("failed to resolve vmType for %q: %v", t.Name, err)
106105
}
107106
maps.Copy(locations, locationsFromLimaYAML(y))
108107
}

0 commit comments

Comments
 (0)