Skip to content

Commit

Permalink
cmd/govim: ensure that GOPATH is in a hidden directory (govim#702)
Browse files Browse the repository at this point in the history
In testscript tests, Vim is opened with a working directory of the
workdir. This means that the govim file watcher is watching every file
beneath that directory (every file not hidden, that is).

GOPATH is currently $WORK/gopath which means that the govim file watcher
will, incorrectly, be spotting .go files that change within the module
cache.

Fix this be explicitly putting GOPATH within $HOME which is already
defined as $WORK/.home
  • Loading branch information
myitcv committed Jan 21, 2020
1 parent de8e9ac commit ca3f52d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cmd/govim/main_test.go
Expand Up @@ -117,6 +117,7 @@ func TestScripts(t *testing.T) {
"GOPROXY="+proxy.URL,
"GONOSUMDB=*",
"HOME="+home,
"GOPATH="+filepath.Join(home, "gopath"),
"PLUGIN_PATH="+govimPath,
)
if workdir != "" {
Expand Down

0 comments on commit ca3f52d

Please sign in to comment.