From d475828acf13d688c0142e0609448761d97f01f5 Mon Sep 17 00:00:00 2001 From: kyle Date: Fri, 6 Mar 2015 16:07:52 +0800 Subject: [PATCH] fix error msg when use command "bee api" bug missing the Argument --- apiapp.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apiapp.go b/apiapp.go index b3f373e..bb760ba 100644 --- a/apiapp.go +++ b/apiapp.go @@ -547,6 +547,10 @@ func init() { func createapi(cmd *Command, args []string) int { curpath, _ := os.Getwd() + if len(args) < 1 { + ColorLog("[ERRO] Argument [appname] is missing\n") + os.Exit(2) + } if len(args) > 1 { cmd.Flag.Parse(args[1:]) }