mirror of
https://github.com/Llewellynvdm/fzf.git
synced 2024-12-22 10:58:59 +00:00
[install] Improve error message
This commit is contained in:
parent
55d566b72f
commit
1c31e07d34
19
install
19
install
@ -21,16 +21,21 @@ ask() {
|
||||
|
||||
check_binary() {
|
||||
echo -n " - Checking fzf executable ... "
|
||||
local output=$("$fzf_base"/bin/fzf --version 2>&1)
|
||||
if [ "$version" = "$output" ]; then
|
||||
local output
|
||||
output=$("$fzf_base"/bin/fzf --version 2>&1)
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Error: $output"
|
||||
binary_error="Invalid binary"
|
||||
elif [ "$version" != "$output" ]; then
|
||||
echo "$output != $version"
|
||||
binary_error="Invalid version"
|
||||
else
|
||||
echo "$output"
|
||||
binary_error=""
|
||||
else
|
||||
echo "$output != $version"
|
||||
rm -f "$fzf_base"/bin/fzf
|
||||
binary_error="Invalid binary"
|
||||
return 1
|
||||
return 0
|
||||
fi
|
||||
rm -f "$fzf_base"/bin/fzf
|
||||
return 1
|
||||
}
|
||||
|
||||
symlink() {
|
||||
|
Loading…
Reference in New Issue
Block a user