Write msgfmt output to /NUL
Fix NUL file created when opening a .po file. Using -o NUL actually creates a file called NUL in the current directory. Using /NUL doesn't create one in C:\ (the drive the file is located on) or any visible drive. Despite msgfmt being able to create the file NUL (which isn't supposed to be allowed), it's difficult to delete NUL (windows explorer can't handle it but WSL's unix rm can remove it). Test Open po file and see the same warnings as before, but no NUL file created. Using msgfmt.exe provided by git (installed via scoop).
This commit is contained in:
parent
6def2f0a82
commit
ecba959f28
|
@ -65,8 +65,9 @@ function! airline#extensions#po#stats()
|
||||||
return b:airline_po_stats
|
return b:airline_po_stats
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
" Write stdout to null because we only want to see warnings.
|
||||||
if g:airline#init#is_windows
|
if g:airline#init#is_windows
|
||||||
let cmd = 'msgfmt --statistics -o NUL '
|
let cmd = 'msgfmt --statistics -o /NUL '
|
||||||
else
|
else
|
||||||
let cmd = 'msgfmt --statistics -o /dev/null -- '
|
let cmd = 'msgfmt --statistics -o /dev/null -- '
|
||||||
endif
|
endif
|
||||||
|
|
Loading…
Reference in New Issue