From 828ba150ef1eedcabaf997cb159ffe66004cd630 Mon Sep 17 00:00:00 2001 From: Grigory Petrov Date: Tue, 10 Mar 2015 07:58:31 +0300 Subject: [PATCH 1/2] Fixed 'NUL' file being created on Windows. --- syntax_checkers/typescript/tsc.vim | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/syntax_checkers/typescript/tsc.vim b/syntax_checkers/typescript/tsc.vim index d7073670c..cfcc91172 100644 --- a/syntax_checkers/typescript/tsc.vim +++ b/syntax_checkers/typescript/tsc.vim @@ -17,9 +17,16 @@ let s:save_cpo = &cpo set cpo&vim function! SyntaxCheckers_typescript_tsc_GetLocList() dict - let makeprg = self.makeprgBuild({ - \ 'args': '--module commonjs', - \ 'args_after': '--out ' . syntastic#util#DevNull() }) + if has("win32") + " On Windows, tsc is unable to use 'NUL'. + let makeprg = self.makeprgBuild({ + \ 'args': '--module commonjs', + \ 'args_after': '--outDir ' . $temp }) + else + let makeprg = self.makeprgBuild({ + \ 'args': '--module commonjs', + \ 'args_after': '--out ' . syntastic#util#DevNull() }) + endif let errorformat = \ '%E%f %#(%l\,%c): error %m,' . From 933282175a8dace26bbfc286d48cb1672527f282 Mon Sep 17 00:00:00 2001 From: Grigory Petrov Date: Tue, 10 Mar 2015 08:12:28 +0300 Subject: [PATCH 2/2] Idiomatic Windows detection. --- syntax_checkers/typescript/tsc.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/syntax_checkers/typescript/tsc.vim b/syntax_checkers/typescript/tsc.vim index cfcc91172..0680d6d65 100644 --- a/syntax_checkers/typescript/tsc.vim +++ b/syntax_checkers/typescript/tsc.vim @@ -17,7 +17,7 @@ let s:save_cpo = &cpo set cpo&vim function! SyntaxCheckers_typescript_tsc_GetLocList() dict - if has("win32") + if syntastic#util#isRunningWindows() " On Windows, tsc is unable to use 'NUL'. let makeprg = self.makeprgBuild({ \ 'args': '--module commonjs',