From 28fe93cd15bcffb77dc358953a8228cdfb7188db Mon Sep 17 00:00:00 2001 From: J Huang Date: Tue, 13 Jun 2017 13:06:53 +0800 Subject: [PATCH] [Fix] `nvm install -s`: properly precompute clang version --- nvm.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nvm.sh b/nvm.sh index 365e8e3..9d91e1a 100644 --- a/nvm.sh +++ b/nvm.sh @@ -1895,7 +1895,7 @@ nvm_install_source() { make='gmake' ;; esac - if nvm_has "clang++" && nvm_has "clang" && nvm_version_greater_than_or_equal_to nvm_clang_version 3.5; then + if nvm_has "clang++" && nvm_has "clang" && nvm_version_greater_than_or_equal_to "$(nvm_clang_version)" 3.5; then if [ -z "${CC-}" ] || [ -z "${CXX-}" ] ; then nvm_echo "Clang v3.5+ detected! CC or CXX not specified, will use Clang as C/C++ compiler!" MAKE_CXX="CC=${CC:-cc} CXX=${CXX:-c++}"