From d1035fd92577860fe0ab6f3d299302a8bba96e4a Mon Sep 17 00:00:00 2001 From: Dan Ballard Date: Thu, 28 Jun 2018 09:15:21 -0700 Subject: [PATCH] disallow cli creating new group for empty server --- app/cli/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/cli/main.go b/app/cli/main.go index fb50bb1..5e5d678 100644 --- a/app/cli/main.go +++ b/app/cli/main.go @@ -309,7 +309,7 @@ func main() { fmt.Printf("Error inviting peer to group, usage: %s\n", usages["invite-to-group"]) } case "new-group": - if len(commands) == 2 { + if len(commands) == 2 && commands[1] != "" { fmt.Printf("Setting up a new group on server:%v\n", commands[1]) id, _, err := app.Peer.StartGroup(commands[1]) if err == nil {