From 85d8d2f217ddbf8b02d1ef5dd181f3cc44bb1f00 Mon Sep 17 00:00:00 2001 From: w0rp Date: Sat, 8 Oct 2016 16:01:17 +0100 Subject: [PATCH] Use cmd /c for Windows commands to fix a bug with running linters on Windows. --- plugin/ale/zmain.vim | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/plugin/ale/zmain.vim b/plugin/ale/zmain.vim index 8db9d8f..cc70ff0 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