Skip to content

Commit 08874fa

Browse files
committed
limactl factory-reset: retain vz-identifier
`vz-identifier` will be dependended by PR 1951 for resolving vmType, so it has to be retained. Signed-off-by: Akihiro Suda <[email protected]>
1 parent c402cc8 commit 08874fa

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cmd/limactl/factory-reset.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
"strings"
88

99
"github.com/lima-vm/lima/pkg/store"
10+
"github.com/lima-vm/lima/pkg/store/filenames"
1011
"github.com/sirupsen/logrus"
1112
"github.com/spf13/cobra"
1213
)
@@ -45,7 +46,7 @@ func factoryResetAction(_ *cobra.Command, args []string) error {
4546
}
4647
for _, f := range fi {
4748
path := filepath.Join(inst.Dir, f.Name())
48-
if !strings.HasSuffix(path, ".yaml") && !strings.HasSuffix(path, ".yml") {
49+
if !strings.HasSuffix(path, ".yaml") && !strings.HasSuffix(path, ".yml") && f.Name() != filenames.VzIdentifier {
4950
logrus.Infof("Removing %q", path)
5051
if err := os.Remove(path); err != nil {
5152
logrus.Error(err)

0 commit comments

Comments
 (0)