node: unset NPM_CONFIG_PREFIX for install

Mitigate npm `make install` error

- clears `$NPM_CONFIG_PREFIX` value to mitigate "No such file or directory" error

Closes Homebrew/homebrew#48901.

Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
This commit is contained in:
Wil Moore III 2016-02-05 18:12:44 -07:00 committed by Dominyk Tiller
parent ebc3a3eba2
commit f8934a76c9

View file

@ -69,6 +69,8 @@ class Node < Formula
ENV.prepend_path "PATH", bin
# set log level temporarily for npm's `make install`
ENV["NPM_CONFIG_LOGLEVEL"] = "verbose"
# unset prefix temporarily for npm's `make install`
ENV.delete "NPM_CONFIG_PREFIX"
cd buildpath/"npm_install" do
system "./configure", "--prefix=#{libexec}/npm"