-
Notifications
You must be signed in to change notification settings - Fork 18.3k
Closed
Labels
NeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.modules
Milestone
Description
What version of Go are you using (go version
)?
$ go version
go version go1.11rc1 linux/amd64
Does this issue reproduce with the latest release?
yeap
What operating system and processor architecture are you using (go env
)?
$ uname -a
Linux theia 4.15.0-32-generic #35-Ubuntu SMP Fri Aug 10 17:58:07 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/pivotal/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/pivotal/workspace/mod-experiment/go"
GOPROXY=""
GORACE=""
GOROOT="/home/pivotal/sdk/go1.11rc1"
GOTMPDIR=""
GOTOOLDIR="/home/pivotal/sdk/go1.11rc1/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/pivotal/workspace/mod-experiment/mod/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 -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build771004922=/tmp/go-build -gno-record-gcc-switches"
What did you do?
I tried to do rm -r $GOPATH/pkg/mod
to reset my modules cache. It failed with a permissions error. Write permission bit is not set. Even rm -rf
does not work.
Steps to reproduce:
$ mkdir ~/workspace/mod-experiment
$ cd ~/workspace/mod-experiment
$ export GOPATH=$PWD/go
$ mkdir go mod
$ cd mod
$ go mod init foo
go: creating new go.mod: module foo
$ go get rsc.io/quote
go: finding rsc.io/quote v1.5.2
go: finding rsc.io/sampler v1.3.0
go: finding golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c
go: downloading rsc.io/quote v1.5.2
go: downloading rsc.io/sampler v1.3.0
go: downloading golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c
$ rm -rf $GOPATH/pkg/mod
rm: cannot remove '/home/pivotal/workspace/mod-experiment/go/pkg/mod/golang.org/x/text@v0.0.0-20170915032832-14c0d48ead0c/AUTHORS': Permission denied
...
rm: cannot remove '/home/pivotal/workspace/mod-experiment/go/pkg/mod/rsc.io/sampler@v1.3.0/hello_test.go': Permission denied
$ chmod -R +w $GOPATH/pkg
$ rm -rf $GOPATH/pkg/mod
What did you expect to see?
The $GOPATH/pkg/mod
dir should be deleted.
What did you see instead?
It wasn't.
Metadata
Metadata
Assignees
Labels
NeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.modules