[vim] Fix version check on windows/powershell (#2894)

- Replace fzf#shellescape with shellescape
- Prepend command with '&' in powershell to deal with quoted exe
pull/2889/head^2
Carl Kamholtz 2 years ago committed by GitHub
parent ecc418ba77
commit 728f735281
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -164,7 +164,7 @@ function s:get_version(bin)
if has_key(s:versions, a:bin)
return s:versions[a:bin]
end
let command = fzf#shellescape(a:bin) . ' --version --no-height'
let command = (&shell == 'powershell' ? '&' : '') . shellescape(a:bin) . ' --version --no-height'
let output = systemlist(command)
if v:shell_error || empty(output)
return ''

Loading…
Cancel
Save