We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2a30007 commit 5a07c59Copy full SHA for 5a07c59
autoload/gist.vim
@@ -967,7 +967,9 @@ function! s:GistGetAuthHeader() abort
967
return printf('basic %s', webapi#base64#b64encode(g:github_user.':'.password))
968
endif
969
let auth = ''
970
- if filereadable(s:gist_token_file)
+ if !empty(get(g:, 'gist_token', $GITHUB_TOKEN))
971
+ let auth = 'token ' . get(g:, 'gist_token', $GITHUB_TOKEN)
972
+ elseif filereadable(s:gist_token_file)
973
let str = join(readfile(s:gist_token_file), '')
974
if type(str) == 1
975
let auth = str
0 commit comments