Skip to content

Commit 407dcda

Browse files
authored
If GOPATH is empty check for the value of go env GOPATH
Go 1.8 has a default GOPATH (~/go) , if there is no GOPATH set we should also check for the value of go env GOPATH before bailing out.
1 parent e46dd4d commit 407dcda

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plugin/go.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ command! -nargs=? -complete=dir GoPath call go#path#GoPath(<f-args>)
3232
" target install directory. GoInstallBinaries doesn't install binaries if they
3333
" exist, to update current binaries pass 1 to the argument.
3434
function! s:GoInstallBinaries(updateBinaries)
35-
if $GOPATH == ""
35+
if $GOPATH == "" && go#util#gopath() == ""
3636
echohl Error
3737
echomsg "vim.go: $GOPATH is not set"
3838
echohl None

0 commit comments

Comments
 (0)