Skip to content

Commit 115155c

Browse files
authored
Merge pull request #1984 from ZhongRuoyu/instance-name-override
limactl create: don't override user-specified name
2 parents ce3b98a + 00e2165 commit 115155c

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

cmd/limactl/start.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -425,9 +425,11 @@ func chooseNextCreatorState(st *creatorState, yq string) (*creatorState, error)
425425
return st, fmt.Errorf("invalid answer %d for %d entries", ansEx, len(templates))
426426
}
427427
yamlPath := templates[ansEx].Location
428-
st.instName, err = guessarg.InstNameFromYAMLPath(yamlPath)
429-
if err != nil {
430-
return nil, err
428+
if st.instName == "" {
429+
st.instName, err = guessarg.InstNameFromYAMLPath(yamlPath)
430+
if err != nil {
431+
return nil, err
432+
}
431433
}
432434
st.yBytes, err = os.ReadFile(yamlPath)
433435
if err != nil {

0 commit comments

Comments
 (0)