We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e485c6c commit c1e6b34Copy full SHA for c1e6b34
autoload/gist.vim
@@ -961,7 +961,9 @@ function! s:GistGetAuthHeader() abort
961
return printf('basic %s', webapi#base64#b64encode(g:github_user.':'.password))
962
endif
963
let auth = ''
964
- if filereadable(s:gist_token_file)
+ if !empty(get(g:, 'gist_token', $GITHUB_TOKEN))
965
+ let auth = 'token ' . get(g:, 'gist_token', $GITHUB_TOKEN)
966
+ elseif filereadable(s:gist_token_file)
967
let str = join(readfile(s:gist_token_file), '')
968
if type(str) == 1
969
let auth = str
0 commit comments