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/cover: ignores os.Create error #17951

Closed
mvdan opened this issue Nov 16, 2016 · 1 comment
Closed

cmd/cover: ignores os.Create error #17951

mvdan opened this issue Nov 16, 2016 · 1 comment

Comments

@mvdan
Copy link
Member

mvdan commented Nov 16, 2016

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

go version devel +b75b9e1 Wed Nov 16 16:04:18 2016 +0000 linux/amd64

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

GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/mvdan/go"
GORACE=""
GOROOT="/home/mvdan/tip"
GOTOOLDIR="/home/mvdan/tip/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build770389312=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
PKG_CONFIG="pkg-config"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"

What did you do?

Run go tool cover with an output file it cannot create (unintentionally).

What did you expect to see?

 $ go tool cover -html=/tmp/f -o /f2
[...]
cover: open /f2: permission denied

What did you see instead?

A confusing, unrelated error:

 $ go tool cover -html=/tmp/f -o /f2
[...]
cover: invalid argument

Will send a small CL to fix it.

@gopherbot
Copy link

CL https://golang.org/cl/33278 mentions this issue.

@golang golang locked and limited conversation to collaborators Nov 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants