Use cmd /c for Windows commands to fix a bug with running linters on Windows.

This commit is contained in:
w0rp 2016-10-08 16:01:17 +01:00
parent edc5cedd8c
commit 85d8d2f217

View File

@ -216,6 +216,13 @@ function! s:ApplyLinter(buffer, linter)
let job_options.out_cb = function('s:GatherOutputVim') let job_options.out_cb = function('s:GatherOutputVim')
endif endif
if has('win32')
" job_start commands on Windows have to be run with cmd /c,
" othwerwise %PATHTEXT% will not be used to programs ending int
" .cmd, .bat, .exe, etc.
let l:command = 'cmd /c ' . l:command
endif
" Vim 8 will read the stdin from the file's buffer. " Vim 8 will read the stdin from the file's buffer.
let a:linter.job = job_start(l:command, l:job_options) let a:linter.job = job_start(l:command, l:job_options)
endif endif