From f7e1b50d2251eb957c5454d558352956c9a8feed Mon Sep 17 00:00:00 2001 From: Rebecca Stambler Date: Tue, 12 Feb 2019 14:23:47 -0500 Subject: [PATCH] internal/lsp/cmd: set Serve.app when running with remote Change-Id: Idf299a0b28b77a3372db20ccb0f80512422e601a Reviewed-on: https://go-review.googlesource.com/c/162138 Run-TryBot: Rebecca Stambler TryBot-Result: Gobot Gobot Reviewed-by: Ian Cottrell --- internal/lsp/cmd/cmd.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/lsp/cmd/cmd.go b/internal/lsp/cmd/cmd.go index 9defccd2..40be276b 100644 --- a/internal/lsp/cmd/cmd.go +++ b/internal/lsp/cmd/cmd.go @@ -68,6 +68,7 @@ gopls flags are: // If no arguments are passed it will invoke the server sub command, as a // temporary measure for compatibility. func (app *Application) Run(ctx context.Context, args ...string) error { + app.Serve.app = app if len(args) == 0 { tool.Main(ctx, &app.Serve, args) return nil @@ -91,7 +92,6 @@ func (app *Application) Run(ctx context.Context, args ...string) error { // command line. // The command is specified by the first non flag argument. func (app *Application) commands() []tool.Application { - app.Serve.app = app return []tool.Application{ &app.Serve, &query{app: app},