summaryrefslogtreecommitdiff
path: root/plugin
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2016-10-08 16:01:17 +0100
committerw0rp <devw0rp@gmail.com>2016-10-08 16:01:23 +0100
commit85d8d2f217ddbf8b02d1ef5dd181f3cc44bb1f00 (patch)
tree7d7a666c3421177a27a09e6d578dd43f7c748574 /plugin
parentedc5cedd8ce019d4d06931ec8b449a5179153b71 (diff)
downloadale-85d8d2f217ddbf8b02d1ef5dd181f3cc44bb1f00.zip
Use cmd /c for Windows commands to fix a bug with running linters on Windows.
Diffstat (limited to 'plugin')
-rw-r--r--plugin/ale/zmain.vim7
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