curl: win32: Also try ~/.netrc

Closes https://github.com/tpope/vim-rhubarb/issues/11
This commit is contained in:
Justin M. Keyes
2016-01-08 12:44:03 -05:00
committed by Tim Pope
parent 715789e554
commit 8620dc1277

View File

@@ -116,6 +116,8 @@ function! s:curl_arguments(path, ...) abort
call extend(args, ['-H', 'Authorization: bearer ' . g:RHUBARB_TOKEN])
elseif s:credentials() !~# '^[^:]*:$'
call extend(args, ['-u', s:credentials()])
elseif has('win32') && filereadable(expand('~/.netrc'))
call extend(args, ['--netrc-file', expand('~/.netrc')])
else
call extend(args, ['--netrc'])
endif