node: set npm prefix when installing.

References Homebrew/homebrew#29138.
This commit is contained in:
Mike McQuaid 2014-06-03 13:48:09 +01:00
parent fcfa8c531d
commit c53ad64ce5

View file

@ -56,7 +56,8 @@ class Node < Formula
npmrc.atomic_write("prefix = #{HOMEBREW_PREFIX}\n")
npm_root.cd { system "make", "install" }
system "#{HOMEBREW_PREFIX}/bin/npm", "update", "npm", "-g"
system "#{HOMEBREW_PREFIX}/bin/npm", "update", "npm", "-g",
"--prefix", HOMEBREW_PREFIX
Pathname.glob(npm_root/"man/*") do |man|
man.children.each do |file|