Fix write to index on Vim 7

Resolves: https://github.com/tpope/vim-fugitive/issues/2254
This commit is contained in:
Tim Pope
2024-01-17 18:24:43 -05:00
parent 5965909358
commit 2c999d4a69

View File

@@ -1007,7 +1007,7 @@ function! s:StdoutToFile(out, cmd, ...) abort
throw 'fugitive: Vim 8 or higher required to use ' . &shell throw 'fugitive: Vim 8 or higher required to use ' . &shell
else else
let cmd = fugitive#ShellCommand(a:cmd) let cmd = fugitive#ShellCommand(a:cmd)
return s:SystemError(' (' . cmd . ' >' . a:out . ') ') return s:SystemError(' (' . cmd . ' >' . (len(a:out) ? a:out : '/dev/null') . ') ')
endif endif
endfunction endfunction