net/tlsdial,tstest,version: use go command from $PATH
Go now includes the GOROOT bin directory in $PATH while running tests and generate, so it is no longer necessary to construct a path using runtime.GOROOT(). Fixes #6689 Signed-off-by: James Tucker <james@tailscale.com>
This commit is contained in:

committed by
James Tucker

parent
467ace7d0c
commit
b2c55e62c8
@ -23,8 +23,7 @@ var (
|
||||
func TestFindModuleInfo(t *testing.T) {
|
||||
dir := t.TempDir()
|
||||
name := filepath.Join(dir, "tailscaled-version-test")
|
||||
goTool := filepath.Join(runtime.GOROOT(), "bin", "go"+exe())
|
||||
out, err := exec.Command(goTool, "build", "-o", name, "tailscale.com/cmd/tailscaled").CombinedOutput()
|
||||
out, err := exec.Command("go", "build", "-o", name, "tailscale.com/cmd/tailscaled").CombinedOutput()
|
||||
if err != nil {
|
||||
t.Fatalf("failed to build tailscaled: %v\n%s", err, out)
|
||||
}
|
||||
|
Reference in New Issue
Block a user