Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

golang.org/dl/gotip: needs to add its go binary to PATH #35507

Closed
dmitshur opened this issue Nov 11, 2019 · 1 comment
Closed

golang.org/dl/gotip: needs to add its go binary to PATH #35507

dmitshur opened this issue Nov 11, 2019 · 1 comment
Labels
Builders x/build issues (builders, bots, dashboards) FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@dmitshur
Copy link
Contributor

dmitshur commented Nov 11, 2019

The fix for #28103 was applied to the golang.org/dl/internal/version package, which fixed the problem for all golang.org/dl/go... packages other than golang.org/dl/gotip.

I tested with a small program:

main.go source
package main

import (
	"fmt"
	"log"
	"os/exec"
)

func main() {
	goBin, err := exec.LookPath("go")
	if err != nil {
		log.Fatalln(err)
	}
	fmt.Println(goBin)
	out, err := exec.Command(goBin, "version").Output()
	if err != nil {
		log.Fatalln(err)
	}
	fmt.Printf("%s version: %s", goBin, out)
}
$ go run ./main.go
/usr/local/go/bin/go
/usr/local/go/bin/go version: go version go1.13.4 darwin/amd64
$ go1.12.9 run ./main.go
/Users/dmitshur/sdk/go1.12.9/bin/go
/Users/dmitshur/sdk/go1.12.9/bin/go version: go version go1.12.9 darwin/amd64
$ gotip run ./main.go
/usr/local/go/bin/go
/usr/local/go/bin/go version: go version go1.13.4 darwin/amd64

gotip run ./main.go should be printing:

/Users/dmitshur/sdk/gotip/bin/go
/Users/dmitshur/sdk/gotip/bin/go version: go version devel +ad7ce391 Mon Nov 11 18:00:18 2019 +0000 darwin/amd64
@dmitshur dmitshur added the NeedsFix The path to resolution is known, but the work has not been done. label Nov 11, 2019
@dmitshur dmitshur added this to the Unreleased milestone Nov 11, 2019
@dmitshur dmitshur added the Builders x/build issues (builders, bots, dashboards) label Nov 11, 2019
@dmitshur dmitshur self-assigned this Nov 11, 2019
@gopherbot
Copy link

Change https://golang.org/cl/206537 mentions this issue: gotip: add $GOROOT/bin to $PATH before starting go binary

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Builders x/build issues (builders, bots, dashboards) FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

2 participants