mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-03-13 10:15:41 +08:00
fix(curl): use bundle curl instead of windows's
This commit is contained in:
parent
7b32f1a23d
commit
83fc0188ba
@ -191,7 +191,14 @@ endfunction
|
|||||||
|
|
||||||
function! chat#gitter#send(room, msg) abort
|
function! chat#gitter#send(room, msg) abort
|
||||||
let roomid = s:room_to_roomid(a:room)
|
let roomid = s:room_to_roomid(a:room)
|
||||||
let cmd = ['curl', '-X', 'POST', '-H', 'Content-Type: application/json', '-H', 'Accept: application/json',
|
" the win 11 curl in system32/ directory do not support unicode, use
|
||||||
|
" neovim's curl
|
||||||
|
if has('nvim') && exists('v:progpath') && (has('win64') || has('win32'))
|
||||||
|
let curl = fnamemodify(v:progpath, ':h') . '\curl.exe'
|
||||||
|
else
|
||||||
|
let curl = 'curl'
|
||||||
|
endif
|
||||||
|
let cmd = [curl, '-X', 'POST', '-H', 'Content-Type: application/json', '-H', 'Accept: application/json',
|
||||||
\ '-H', 'Authorization: Bearer ' . g:chat_gitter_token,
|
\ '-H', 'Authorization: Bearer ' . g:chat_gitter_token,
|
||||||
\ printf('https://api.gitter.im/v1/rooms/%s/chatMessages', roomid),
|
\ printf('https://api.gitter.im/v1/rooms/%s/chatMessages', roomid),
|
||||||
\ '-d',
|
\ '-d',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user