Skip to content

cmd/go: exit with error when $GOPATH is set to "." #4062

@gopherbot

Description

@gopherbot

by nicksaika:

Running "GOPATH=. go build pkg/foo" should be disallowed when $GOPATH is set
to "." as the compile process usually errors out by saying it cannot find a
particular file, even though that file definitely exists.

Granted, running the command like so "GOPATH=$PWD go build pkg/foo" works
successfully, but perhaps the go tool should notice when $GOPATH is set to "."
and error out.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions