Skip to content
Myr

[install] Print better error message when `fzf --version` failed

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Related #1466

authored by Junegunn Choi · committed by Junegunn Choi · parent 3bd8441 · Browse files · 1 file+10 added−7 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+10 added−7 removed

  • other:+10 added−7 removed

1 file+10 added−7 removed

modified:install+10 added-7 removed
89 unmodified lines
9091check_binary() {92 echo -n " - Checking fzf executable ... "93 local output94 output=$("$fzf_base"/bin/fzf --version 2>&1 | awk '{print $1}')94 output=$("$fzf_base"/bin/fzf --version 2>&1)95 if [ $? -ne 0 ]; then96 echo "Error: $output"97 binary_error="Invalid binary"98 elif [ "$version" != "$output" ]; then99 echo "$output != $version"100 binary_error="Invalid version"98 else99 output=${output/ */}100 if [ "$version" != "$output" ]; then101 echo "$output != $version"102 binary_error="Invalid version"103 else102 echo "$output"103 binary_error=""104 return 0104 echo "$output"105 binary_error=""106 return 0107 fi108 fi109 rm -f "$fzf_base"/bin/fzf110 return 1111}
284 unmodified lines