Bug fix: missing a couple of executable() checks.

This commit is contained in:
LCD 47 2015-08-06 08:27:42 +03:00
parent 748725c775
commit 3fb8281a6d
3 changed files with 9 additions and 1 deletions

View File

@ -19,7 +19,7 @@ if has('reltime')
lockvar! g:_SYNTASTIC_START
endif
let g:_SYNTASTIC_VERSION = '3.6.0-143'
let g:_SYNTASTIC_VERSION = '3.6.0-144'
lockvar g:_SYNTASTIC_VERSION
" Sanity checks {{{1

View File

@ -18,6 +18,10 @@ let s:save_cpo = &cpo
set cpo&vim
function! SyntaxCheckers_javascript_jsxhint_IsAvailable() dict
if !executable(self.getExec())
return 0
endif
let version_output = syntastic#util#system(self.getExecEscaped() . ' --version')
let parsed_ver = !v:shell_error && (version_output =~# '\m^JSXHint\>') ? syntastic#util#parseVersion(version_output) : []
if len(parsed_ver)

View File

@ -18,6 +18,10 @@ let s:save_cpo = &cpo
set cpo&vim
function! SyntaxCheckers_typescript_tsc_IsAvailable() dict
if !executable(self.getExec())
return 0
endif
let version_output = split(syntastic#util#system(self.getExecEscaped() . ' --version'), '\n', 1)
let ver = filter(copy(version_output), 'v:val =~# ''\m\<Version ''')
let parsed_ver = len(ver) ? syntastic#util#parseVersion(ver[0], '\v<Version \zs\d+(\.\d+)\ze') : []