From b6fe752cdd0c9224615e05353bbf1e2433a5a945 Mon Sep 17 00:00:00 2001 From: tudorilisoi Date: Sat, 2 Jan 2016 13:10:18 +0200 Subject: [PATCH] Patch for --reinstall-from on Ubuntu/bash I had a problem with xargs when installing on Ubuntu 14, bash version: GNU bash, version 4.3.11(1)-release (x86_64-pc-linux-gnu) This edit fixes it --- nvm.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nvm.sh b/nvm.sh index 9980515..60a6059 100755 --- a/nvm.sh +++ b/nvm.sh @@ -1346,7 +1346,7 @@ nvm_npm_global_modules() { fi local INSTALLS - INSTALLS=$(echo "$NPMLIST" | command sed -e '/ -> / d' -e '/\(empty\)/ d' -e 's/^.* \(.*@[^ ]*\).*/\1/' -e '/^npm@[^ ]*.*$/ d' | command xargs) + INSTALLS=$(echo "$NPMLIST" | command sed -e '/ -> / d' -e '/\(empty\)/ d' -e 's/^.* \(.*@[^ ]*\).*/\1/' -e '/^npm@[^ ]*.*$/ d' | command xargs -0) local LINKS LINKS="$(echo "$NPMLIST" | command sed -n 's/.* -> \(.*\)/\1/ p')"