mirror of https://github.com/golang/go.git
internal/lsp: use exec.CommandContext when running vulncheck
That, hopefully, handles process termination upon context cancellation. (not 100% guaranteed) Change-Id: I79441afb794c37e9e55f710f124871a82aa4effe Reviewed-on: https://go-review.googlesource.com/c/tools/+/420997 Reviewed-by: Suzy Mueller <suzmue@golang.org> Reviewed-by: Robert Findley <rfindley@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com> gopls-CI: kokoro <noreply+kokoro@google.com>
This commit is contained in:
parent
3519aa25b8
commit
af2a0a8167
|
|
@ -817,7 +817,7 @@ func (c *commandHandler) RunVulncheckExp(ctx context.Context, args command.Vulnc
|
|||
return errors.New("vulncheck feature is not available")
|
||||
}
|
||||
|
||||
cmd := exec.Command(os.Args[0], "vulncheck", "-config", args.Pattern)
|
||||
cmd := exec.CommandContext(ctx, os.Args[0], "vulncheck", "-config", args.Pattern)
|
||||
cmd.Dir = filepath.Dir(args.URI.SpanURI().Filename())
|
||||
|
||||
var viewEnv []string
|
||||
|
|
|
|||
Loading…
Reference in New Issue