From 56a6bcaa35ef0fdc68fa361a0944c75fc0f884aa Mon Sep 17 00:00:00 2001 From: Rolf Neugebauer Date: Sun, 2 Apr 2017 12:35:43 +0100 Subject: [PATCH] cli: Don't default to "moby" for run Signed-off-by: Rolf Neugebauer --- src/cmd/moby/run_hyperkit.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/cmd/moby/run_hyperkit.go b/src/cmd/moby/run_hyperkit.go index e0df419b6..0349291eb 100644 --- a/src/cmd/moby/run_hyperkit.go +++ b/src/cmd/moby/run_hyperkit.go @@ -14,9 +14,8 @@ import ( func runHyperKit(args []string) { hyperkitCmd := flag.NewFlagSet("hyperkit", flag.ExitOnError) 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("It defaults to './moby'.\n") fmt.Printf("\n") fmt.Printf("Options:\n") hyperkitCmd.PrintDefaults() @@ -29,11 +28,12 @@ func runHyperKit(args []string) { hyperkitCmd.Parse(args) remArgs := hyperkitCmd.Args() - - prefix := "moby" - if len(remArgs) > 0 { - prefix = remArgs[0] + if len(remArgs) == 0 { + fmt.Println("Please specify the prefix to the image to boot\n") + hyperkitCmd.Usage() + os.Exit(1) } + prefix := remArgs[0] runHyperKitInternal(*runHyperKit, *runCPUs, *runMem, *runDiskSz, *runDisk, prefix) }