- Notifications
You must be signed in to change notification settings - Fork 743
Open
Labels
area/clilimactl CLI user experiencelimactl CLI user experiencegood first issueGood for newcomersGood for newcomers
Description
Setting to 0 is valid because it is the "null" value, meaning to use the default setting.
I wonder if the --cpus flag should not print a message in that case.
Setting to negative numbers is not caught by validation, but will cause a failure to start the VM. This must be caught; limactl edit should never leave lima.yaml in a non-startable state.
We do have validation to reject string values, even though allowing max or host would maybe make sense (host being the number of CPUs of the host, and max maybe 2 less?).
❯ l edit -y foo --cpus 1 INFO[0000] Instance "foo" configuration edited ❯ l edit -y foo --cpus 0 INFO[0000] Instance "foo" configuration edited ❯ l edit -y foo --cpus -1 INFO[0000] Instance "foo" configuration edited ❯ l edit -y foo --cpus max FATA[0000] invalid argument "max" for "--cpus" flag: strconv.ParseInt: parsing "max": invalid syntaxMetadata
Metadata
Assignees
Labels
area/clilimactl CLI user experiencelimactl CLI user experiencegood first issueGood for newcomersGood for newcomers