diff --git a/create.go b/create.go index 899e54ca..77663133 100644 --- a/create.go +++ b/create.go @@ -1,6 +1,7 @@ package main import ( + "fmt" "os" "github.com/urfave/cli" @@ -48,6 +49,11 @@ command(s) that get executed on start, edit the args parameter of the spec. See }, }, Action: func(context *cli.Context) error { + if context.NArg() != 1 { + fmt.Printf("Incorrect Usage.\n\n") + cli.ShowCommandHelp(context, "create") + return fmt.Errorf("runc: \"create\" requires exactly one argument") + } spec, err := setupSpec(context) if err != nil { return err