Fix #895 - Run Node.js scripts with node.exe instead of node on Windows

This commit is contained in:
w0rp
2017-08-31 13:12:24 +01:00
parent 11fafbfd66
commit 6b87dd24ee
12 changed files with 48 additions and 52 deletions

View File

@@ -14,17 +14,9 @@ endfunction
function! ale_linters#javascript#standard#GetCommand(buffer) abort
let l:executable = ale_linters#javascript#standard#GetExecutable(a:buffer)
if ale#Has('win32') && l:executable =~? '\.js$'
" .js files have to be executed with Node on Windows.
let l:head = 'node ' . ale#Escape(l:executable)
else
let l:head = ale#Escape(l:executable)
endif
let l:options = ale#Var(a:buffer, 'javascript_standard_options')
return l:head
return ale#node#Executable(a:buffer, l:executable)
\ . (!empty(l:options) ? ' ' . l:options : '')
\ . ' --stdin %s'
endfunction