[Feature] Validate `config.yaml` at the end of `alpine edit`
maxzinkus opened this issue · comments
Max Zinkus commented
To make alpine edit
more useful, at the end, it should do a quick parse & validate of the config.yaml
file(s) which were edited and relay a message about their validity, erroring if one or more are invalid:
- malformed YAML
alias
is invalidimage
not found in~/.macpine/cache
or not on filesystemarch
not one ofaarch64
orx86_64
cpu
not a positive integermemory
not a positive integer >= 256disk
not a valid sizemount
not a directory on the hostport
string invalidsshport
not a positive integerlocation
not correct (~/.macpine/instance-name
matchingalias
)
- 0 can be checked with the
yaml
library - 1 can be checked with
cmd/rename.go:100 validateName(...)
- 2-9 can be checked with
cmd/launch.go:46 correctArguments(...)
- 10 can be checked manually
Max Zinkus commented
I'll pick this one up :)
Max Zinkus commented