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 <rstambler@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Cottrell <iancottrell@google.com>
This commit is contained in:
Rebecca Stambler 2019-02-12 14:23:47 -05:00
parent 49fb246514
commit f7e1b50d22
1 changed files with 1 additions and 1 deletions

View File

@ -68,6 +68,7 @@ gopls flags are:
// If no arguments are passed it will invoke the server sub command, as a // If no arguments are passed it will invoke the server sub command, as a
// temporary measure for compatibility. // temporary measure for compatibility.
func (app *Application) Run(ctx context.Context, args ...string) error { func (app *Application) Run(ctx context.Context, args ...string) error {
app.Serve.app = app
if len(args) == 0 { if len(args) == 0 {
tool.Main(ctx, &app.Serve, args) tool.Main(ctx, &app.Serve, args)
return nil return nil
@ -91,7 +92,6 @@ func (app *Application) Run(ctx context.Context, args ...string) error {
// command line. // command line.
// The command is specified by the first non flag argument. // The command is specified by the first non flag argument.
func (app *Application) commands() []tool.Application { func (app *Application) commands() []tool.Application {
app.Serve.app = app
return []tool.Application{ return []tool.Application{
&app.Serve, &app.Serve,
&query{app: app}, &query{app: app},