Copy stdout fd to stderr only after stdout is redirected

Signed-off-by: James McCoy <vega.james@gmail.com>
This commit is contained in:
James McCoy 2015-05-24 00:56:44 -04:00
parent c2fc1dc78a
commit 0001094dea

View File

@ -163,7 +163,7 @@ endfunction
" Function: #get_diff_perforce {{{1
function! sy#repo#get_diff_perforce() abort
let diffoptions = has_key(g:signify_diffoptions, 'perforce') ? g:signify_diffoptions.perforce : ''
let diff = system('p4 info 2>&1 >' . sy#util#devnull() . ' && env P4DIFF=diff p4 diff -dU0 '. diffoptions .' '. sy#util#escape(b:sy.path))
let diff = system('p4 info >' . sy#util#devnull() . ' 2>&1 && env P4DIFF=diff p4 diff -dU0 '. diffoptions .' '. sy#util#escape(b:sy.path))
return v:shell_error ? [0, ''] : [1, diff]
endfunction