Skip to content

Commit af2a0a8

Browse files
committed
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 <[email protected]> Reviewed-by: Robert Findley <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Run-TryBot: Hyang-Ah Hana Kim <[email protected]> gopls-CI: kokoro <[email protected]>
1 parent 3519aa2 commit af2a0a8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/lsp/command.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -817,7 +817,7 @@ func (c *commandHandler) RunVulncheckExp(ctx context.Context, args command.Vulnc
817817
return errors.New("vulncheck feature is not available")
818818
}
819819

820-
cmd := exec.Command(os.Args[0], "vulncheck", "-config", args.Pattern)
820+
cmd := exec.CommandContext(ctx, os.Args[0], "vulncheck", "-config", args.Pattern)
821821
cmd.Dir = filepath.Dir(args.URI.SpanURI().Filename())
822822

823823
var viewEnv []string

0 commit comments

Comments
 (0)