diff options
author | Jhon Honce <jhonce@redhat.com> | 2022-05-26 10:21:11 -0700 |
---|---|---|
committer | Matthew Heon <mheon@redhat.com> | 2022-06-14 14:33:48 -0400 |
commit | 8612facae52b6f45c291bda2bcda28d850b48128 (patch) | |
tree | a2a65e154aa070c8c30eed9fa29d069f3678a179 /cmd/podman | |
parent | 745fe37179322b874a087888a2ed5dc78aa3064d (diff) | |
download | podman-8612facae52b6f45c291bda2bcda28d850b48128.tar.gz podman-8612facae52b6f45c291bda2bcda28d850b48128.tar.bz2 podman-8612facae52b6f45c291bda2bcda28d850b48128.zip |
Remove TODO comment
Allowing custom flags to provider has the potential to break all the
hand-crafted commands currently in use. This could become a support
nightmare.
```release-note
NONE
```
[NO NEW TESTS NEEDED]
Signed-off-by: Jhon Honce <jhonce@redhat.com>
Diffstat (limited to 'cmd/podman')
-rw-r--r-- | cmd/podman/machine/init.go | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/cmd/podman/machine/init.go b/cmd/podman/machine/init.go index 6c31f3531..612c36057 100644 --- a/cmd/podman/machine/init.go +++ b/cmd/podman/machine/init.go @@ -25,16 +25,14 @@ var ( Example: `podman machine init myvm`, ValidArgsFunction: completion.AutocompleteNone, } -) -var ( initOpts = machine.InitOptions{} defaultMachineName = machine.DefaultMachineName now bool ) // maxMachineNameSize is set to thirty to limit huge machine names primarily -// because macos has a much smaller file size limit. +// because macOS has a much smaller file size limit. const maxMachineNameSize = 30 func init() { @@ -111,8 +109,7 @@ func init() { flags.BoolVar(&initOpts.Rootful, rootfulFlagName, false, "Whether this machine should prefer rootful container execution") } -// TODO should we allow for a users to append to the qemu cmdline? -func initMachine(cmd *cobra.Command, args []string) error { +func initMachine(_ *cobra.Command, args []string) error { var ( err error vm machine.VM @@ -122,7 +119,7 @@ func initMachine(cmd *cobra.Command, args []string) error { initOpts.Name = defaultMachineName if len(args) > 0 { if len(args[0]) > maxMachineNameSize { - return errors.New("machine name must be 30 characters or less") + return errors.Errorf("machine name %q must be %d characters or less", args[0], maxMachineNameSize) } initOpts.Name = args[0] } |