node: fix NpmNotInstalled requirement

With some older versions of node, apparently the npm directory itself
is not a symlink into the node keg but the npm binary is.

Fixes Homebrew/homebrew#17668.
This commit is contained in:
Misty De Meo 2013-02-19 08:43:27 -06:00
parent 01a5c972d9
commit 609ff6eef8

View file

@ -32,7 +32,7 @@ class NpmNotInstalled < Requirement
satisfy :build_env => false do
begin
path = Pathname.new("#{modules_folder}/npm")
path = Pathname.new("#{modules_folder}/npm/bin/npm")
path.realpath.to_s.include?(HOMEBREW_CELLAR)
rescue Errno::ENOENT
true