Change the version check invocation in install.ps1

When install.ps1 is executed inside MSYS (or cygwin I suspect) cmd
is a shell script that invokes the real cmd.  But in install.ps1 it
tries to open this shell script instead of executing it.

AFAICT the only reason to use cmd /c is to capture stderr because
there is a bug with powersehll; but fzf prints the version information
on stdout so we don't need to care about stderr.  So we can just call
the binary directly.  This avoids the cmd issues.
pull/2708/head
Tom Ritter 2 years ago
parent 9cb7a364a3
commit 71c005b34a

@ -4,7 +4,7 @@ $fzf_base=Split-Path -Parent $MyInvocation.MyCommand.Definition
function check_binary () {
Write-Host " - Checking fzf executable ... " -NoNewline
$output=cmd /c $fzf_base\bin\fzf.exe --version 2>&1
$output= & $fzf_base\bin\fzf.exe --version
if (-not $?) {
Write-Host "Error: $output"
$binary_error="Invalid binary"

Loading…
Cancel
Save