From 0032d4a7f3de7befa2aa03146153042e44193e82 Mon Sep 17 00:00:00 2001 From: Denys Smirnov Date: Tue, 28 Aug 2018 13:09:57 +0300 Subject: [PATCH] fix index out of range error in cli; fixes #78 Signed-off-by: Denys Smirnov --- cmd/bblfsh-cli/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/bblfsh-cli/main.go b/cmd/bblfsh-cli/main.go index 9888332..6d815ea 100644 --- a/cmd/bblfsh-cli/main.go +++ b/cmd/bblfsh-cli/main.go @@ -33,7 +33,6 @@ func main() { if err != nil { fatalf("couldn't parse flags: %v", err) } - filename := args[0] if len(args) == 0 { fatalf("missing file to parse") @@ -42,6 +41,7 @@ func main() { } else if opts.V2 && opts.Query != "" { fatalf("queries are not supported for v2 yet") } + filename := args[0] client, err := bblfsh.NewClient(opts.Host) if err != nil {