Skip to content

Commit

Permalink
Merge pull request neovim#59 from Neki/topic/cross_platform_write_tmp…
Browse files Browse the repository at this point in the history
…_file

Do not use 'cat' to create a temp file.
  • Loading branch information
benekastah committed Mar 17, 2015
2 parents 312cb55 + 3c99107 commit 6300d96
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions autoload/neomake.vim
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,9 @@ function! neomake#Make(options) abort
let tempfile = 1
let tempsuffix = '.'.neomake#utils#Random().'.neomake.tmp'
let makepath .= tempsuffix
" TODO Make this cross platform
silent exe 'w !cat > '.shellescape(makepath)
let escapedpath = fnameescape(makepath)
noautocmd silent exe 'keepalt w! '.escapedpath
noautocmd silent exe 'bwipeout '.escapedpath
call neomake#utils#LoudMessage('Neomake: wrote temp file '.makepath)
endif
endif
Expand Down

0 comments on commit 6300d96

Please sign in to comment.