From d8345ef22344f0a03b9cb876f1a36adfde4d4482 Mon Sep 17 00:00:00 2001 From: zhuyan Date: Tue, 25 Oct 2016 17:50:41 +0800 Subject: [PATCH] Speed up nvm loading when open a new shell Because `brew --prefix nvm` is too slow and the result is usually a fixed value. So run this command everytime will waste a lot of time to get the path. Closes #6246. Signed-off-by: Tomasz Pajor --- Formula/nvm.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Formula/nvm.rb b/Formula/nvm.rb index d08cd1dcca..9931eda2b0 100644 --- a/Formula/nvm.rb +++ b/Formula/nvm.rb @@ -25,7 +25,7 @@ class Nvm < Formula configuration file: export NVM_DIR="$HOME/.nvm" - . "$(brew --prefix nvm)/nvm.sh" + . "#{opt_prefix}/nvm.sh" You can set $NVM_DIR to any location, but leaving it unchanged from #{prefix} will destroy any nvm-installed Node installations