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

x/build: different old install path does not remove the distribution for mac installer #35883

Open
tjamaranhao opened this issue Nov 27, 2019 · 1 comment

Comments

@tjamaranhao
Copy link

@tjamaranhao tjamaranhao commented Nov 27, 2019

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

$ go version
go version go1.11.5 darwin/amd64
$ /usr/local/go/bin/go version
go version go1.13.4 darwin/amd64

Does this issue reproduce with the latest release?

Yes

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

go env Output
$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/tjamaranhao/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/tjamaranhao/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/Cellar/go/1.11.5/libexec"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.11.5/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"

/usr/local/go/bin/go env Output
$ /usr/local/go/bin/go env

GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/tjamaranhao/Library/Caches/go-build"
GOENV="/Users/tjamaranhao/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/tjamaranhao/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=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"

What did you do?

I downloaded go 1.11.5 months ago and had it installed on my machine.

Then now, I'm taking a Go training and decided to upgrade my go to the most recent version 1.13.4.

Downloaded the installation file for Mac
Executed the package
It popped up a msg saying it identified a previous version and was going o uninstall it
Moved on and finished the installation.

Then when I ran go version, it returned it was still on version 1.11.5.
Then I ran where go command and it returned:
$ where go
/usr/local/bin/go
/usr/local/go/bin/go

That's when I realized it change the installation path. Now I have both versions on my computer

What did you expect to see?

I expected the installer to uninstall 1.11.5 and leave only 1.13.4

What did you see instead?

The main installation remain pointing to 1.11.5, so I'll need to manually uninstall it now.

@agnivade

This comment has been minimized.

Copy link
Contributor

@agnivade agnivade commented Nov 28, 2019

It doesn't look like your previous installation was done by the standard installer. So I guess it detected a go binary in the PATH but it failed to remove it because it was installed in a different location. I would recommend to always use the same installer.

/cc @dmitshur in case the removal message can be improved.

@agnivade agnivade changed the title Different installation path on 1.13.4. Did not uninstall previous version 1.11.5 x/build: different old install path does not remove the distribution for mac installer Nov 28, 2019
@gopherbot gopherbot added this to the Unreleased milestone Nov 28, 2019
@gopherbot gopherbot added the Builders label Nov 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.