mirror of
https://github.com/amix/vimrc
synced 2025-06-16 09:35:01 +08:00
update plugins
ran the plugin update script
This commit is contained in:
@ -144,12 +144,19 @@ function! go#package#FromPath(arg) abort
|
||||
let l:cd = exists('*haslocaldir') && haslocaldir() ? 'lcd' : 'cd'
|
||||
let l:dir = getcwd()
|
||||
|
||||
let l:path = a:arg
|
||||
let l:path = fnamemodify(a:arg, ':p')
|
||||
if !isdirectory(l:path)
|
||||
let l:path = fnamemodify(l:path, ':h')
|
||||
endif
|
||||
|
||||
execute l:cd fnameescape(l:path)
|
||||
if glob("*.go") == ""
|
||||
" There's no Go code in this directory. We might be in a module directory
|
||||
" which doesn't have any code at this level.
|
||||
if !empty(s:module())
|
||||
return -1
|
||||
endif
|
||||
endif
|
||||
let [l:out, l:err] = go#util#Exec(['go', 'list'])
|
||||
execute l:cd fnameescape(l:dir)
|
||||
if l:err != 0
|
||||
|
Reference in New Issue
Block a user