From bff7e9edf58a6f47d566053e68c30e2bccfb57d0 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Thu, 26 Dec 2013 01:39:17 +0900 Subject: [PATCH] Should not `--disable-gems` when curses gem is used (#14) --- install | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/install b/install index 7a98cb3..bd7c10b 100755 --- a/install +++ b/install @@ -33,7 +33,12 @@ echo -n "Checking Ruby version ... " /usr/bin/env ruby -e 'exit RUBY_VERSION >= "1.9"' if [ $? -eq 0 ]; then echo ">= 1.9" - fzf_cmd="$ruby --disable-gems $fzf_base/fzf" + /usr/bin/env ruby --disable-gems -e "begin; require 'curses'; rescue Exception; exit 1; end" + if [ $? -eq 0 ]; then + fzf_cmd="$ruby --disable-gems $fzf_base/fzf" + else + fzf_cmd="$ruby $fzf_base/fzf" + fi else echo "< 1.9" fzf_cmd="$ruby $fzf_base/fzf"