fix error msg when use command "bee api" bug missing the Argument

This commit is contained in:
kyle 2015-03-06 16:07:52 +08:00
parent 926ef73108
commit d475828acf
1 changed files with 4 additions and 0 deletions

View File

@ -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:])
}