From ee6d4ab0749e6c5772ef05a4e67fdcdd1f14d771 Mon Sep 17 00:00:00 2001 From: Fraser Tweedale Date: Fri, 21 Feb 2014 20:18:57 +1000 Subject: [PATCH] fix ls command in dash The `colorize_version` command fails in dash (default /bin/sh on Ubuntu) with an error like: local: v0.2.3: bad variable name Instead of using a local variable, interpolate the function argument directly to avoid the error. --- nvm.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/nvm.sh b/nvm.sh index 178aada..f40ac07 100755 --- a/nvm.sh +++ b/nvm.sh @@ -139,8 +139,7 @@ nvm_checksum() { } colorize_version() { - local VERSION=$1 - echo -e "\033[0;34m$VERSION\033[0m" + echo -e "\033[0;34m$1\033[0m" } print_versions() {