mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-21 10:09:07 +00:00
cli: Don't default to "moby" for run
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
This commit is contained in:
parent
eda4c14aa6
commit
cbb3ff611f
@ -14,9 +14,8 @@ import (
|
|||||||
func runHyperKit(args []string) {
|
func runHyperKit(args []string) {
|
||||||
hyperkitCmd := flag.NewFlagSet("hyperkit", flag.ExitOnError)
|
hyperkitCmd := flag.NewFlagSet("hyperkit", flag.ExitOnError)
|
||||||
hyperkitCmd.Usage = func() {
|
hyperkitCmd.Usage = func() {
|
||||||
fmt.Printf("USAGE: %s run hyperkit [options] [prefix]\n\n", os.Args[0])
|
fmt.Printf("USAGE: %s run hyperkit [options] prefix\n\n", os.Args[0])
|
||||||
fmt.Printf("'prefix' specifies the path to the VM image.\n")
|
fmt.Printf("'prefix' specifies the path to the VM image.\n")
|
||||||
fmt.Printf("It defaults to './moby'.\n")
|
|
||||||
fmt.Printf("\n")
|
fmt.Printf("\n")
|
||||||
fmt.Printf("Options:\n")
|
fmt.Printf("Options:\n")
|
||||||
hyperkitCmd.PrintDefaults()
|
hyperkitCmd.PrintDefaults()
|
||||||
@ -29,11 +28,12 @@ func runHyperKit(args []string) {
|
|||||||
|
|
||||||
hyperkitCmd.Parse(args)
|
hyperkitCmd.Parse(args)
|
||||||
remArgs := hyperkitCmd.Args()
|
remArgs := hyperkitCmd.Args()
|
||||||
|
if len(remArgs) == 0 {
|
||||||
prefix := "moby"
|
fmt.Println("Please specify the prefix to the image to boot\n")
|
||||||
if len(remArgs) > 0 {
|
hyperkitCmd.Usage()
|
||||||
prefix = remArgs[0]
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
prefix := remArgs[0]
|
||||||
|
|
||||||
runHyperKitInternal(*runHyperKit, *runCPUs, *runMem, *runDiskSz, *runDisk, prefix)
|
runHyperKitInternal(*runHyperKit, *runCPUs, *runMem, *runDiskSz, *runDisk, prefix)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user