-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
go/build: defaultGOPATH cannot handle the confiliction correctly #18863
Comments
CL https://golang.org/cl/36073 mentions this issue. |
If GOROOT is being corrupted due to the mishandling, we should consider fixing this in 1.8. /cc @bradfitz |
That one-line change might be okay. I'd prefer to see a test, though, at which point it's more than one line. I'll let @rsc decide. |
Assigning
|
go/build/build.go uses: func envOr(name, def string) string {
s := os.Getenv(name)
if s == "" {
return def
}
return s
} I cannot judge this is WAI or an another subtle bug, though. |
I'm not sure this is a bug
…On Wed, 1 Feb 2017, 10:27 hirochachacha ***@***.***> wrote:
@davecheney <https://github.com/davecheney>
go/build/build.go uses:
func envOr(name, def string) string {
s := os.Getenv(name)
if s == "" {
return def
}
return s
}
I cannot judge this is WAI or an another subtle bug, though.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#18863 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAAcA-2wq94CuSkV8eINLFbSVrgPHBTMks5rX8NUgaJpZM4LytPI>
.
|
CL https://golang.org/cl/36427 mentions this issue. |
Cherry-pick to release branch pending. |
CL https://golang.org/cl/36536 mentions this issue. |
…TH=GOROOT Fixes #18863. Change-Id: I0723563cd23728b0d43ebcc25979bf8d21e2a72c Reviewed-on: https://go-review.googlesource.com/36427 Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-on: https://go-review.googlesource.com/36536 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
Please answer these questions before submitting your issue. Thanks!
What did you do?
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
then,
$GOROOT="$HOME/go" GOPATH="" go run c.go
:$GOROOT="$HOME/go/" GOPATH="" go run c.go
:What did you expect to see?
same outputs
What did you see instead?
different outputs
Does this issue reproduce with the latest release (go1.7.5)?
IIUC, default go path is introduced in go1.8.
System details
The text was updated successfully, but these errors were encountered: