diff options
author | w0rp <devw0rp@gmail.com> | 2016-10-08 16:01:17 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2016-10-08 16:01:23 +0100 |
commit | 85d8d2f217ddbf8b02d1ef5dd181f3cc44bb1f00 (patch) | |
tree | 7d7a666c3421177a27a09e6d578dd43f7c748574 | |
parent | edc5cedd8ce019d4d06931ec8b449a5179153b71 (diff) | |
download | ale-85d8d2f217ddbf8b02d1ef5dd181f3cc44bb1f00.zip |
Use cmd /c for Windows commands to fix a bug with running linters on Windows.
-rw-r--r-- | plugin/ale/zmain.vim | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/plugin/ale/zmain.vim b/plugin/ale/zmain.vim index 8db9d8f7..cc70ff04 100644 --- a/plugin/ale/zmain.vim +++ b/plugin/ale/zmain.vim @@ -216,6 +216,13 @@ function! s:ApplyLinter(buffer, linter) let job_options.out_cb = function('s:GatherOutputVim') 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. let a:linter.job = job_start(l:command, l:job_options) endif |