Skip to content

Commit

Permalink
fix: allow command args to override config excluded binaries
Browse files Browse the repository at this point in the history
Signed-off-by: Elias Van Ootegem <[email protected]>
  • Loading branch information
EVODelavega committed Jun 7, 2024
1 parent 4c6513e commit a38c93f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
5 changes: 3 additions & 2 deletions doc/vim-go.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2502,8 +2502,9 @@ Set the sign text used for breakpoints in the debugger. By default it's '>'.
*'g:go_exclude_binaries'*

Set a list of binaries to exclude from installing/updating when running either
|:GoInstallBinaries| or |:GoUpdateBinaries|. Possible values are all keys used
in the `s:packages` dictionary:
|:GoInstallBinaries| or |:GoUpdateBinaries| without specifying a specific
binary. This list is ignored when installing or updating specific binaries to
specific versions. Possible values are all keys used in the `s:packages` dictionary:

>
let g:go_exclude_binaries = [
Expand Down
9 changes: 5 additions & 4 deletions plugin/go.vim
Original file line number Diff line number Diff line change
Expand Up @@ -130,12 +130,13 @@ function! s:GoInstallBinaries(updateBinaries, ...)
endfor
else
let l:packages = s:packages
" Filter packages from exclude list, if no binaries were explicitly
" specified.
for l:bin in go#config#GoExcludeBinaries()
call remove(l:bin, l:packages)
endfor
endif

" Filter packages from exclude list
for l:bin in go#config#GoExcludeBinaries()
call remove(l:bin, l:packages)
endfor

let l:platform = ''
if go#util#IsWin()
Expand Down

0 comments on commit a38c93f

Please sign in to comment.