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

cmd/go: go install should warn when installing outside PATH #35912

Open
pjweinbgo opened this issue Nov 30, 2019 · 2 comments
Open

cmd/go: go install should warn when installing outside PATH #35912

pjweinbgo opened this issue Nov 30, 2019 · 2 comments
Labels
GoCommand cmd/go NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@pjweinbgo
Copy link
Contributor

pjweinbgo commented Nov 30, 2019

What version of Go are you using (go version)?

$ go version
go version go1.13 darwin/amd64

Does this issue reproduce with the latest release?

What operating system and processor architecture are you using (go env)?

go env Output
$ go env


GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/pjw/Library/Caches/go-build"
GOENV="/Users/pjw/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/pjw/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/pjw/gostuff/src/golang.org/x/tools/gopls/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/72/mj6w6gyj5dn6yp_2_tlbdwym00052r/T/go-build953192293=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

In golang.org/x/tools/gopls, do
go install .
as GOBIN is not set and GOPATH is, the output is put in $GOPATH/bin.

What did you expect to see?

I expected it to warn me that I would not find the new executable in my PATH.

What did you see instead?

silence. I know this is my misconfiguration, but a little help would have been nice.

@dmitshur dmitshur changed the title go install should warn when installing outside PATH cmd/go: go install should warn when installing outside PATH Dec 2, 2019
@dmitshur dmitshur added modules NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Dec 2, 2019
@dmitshur
Copy link
Contributor

dmitshur commented Dec 2, 2019

/cc @bcmills @jayconrod

@flavienbwk
Copy link

flavienbwk commented Oct 24, 2021

This is still a confusing behaviour in october 2021 with 1.17

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GoCommand cmd/go NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

4 participants