From 8dff5bab25862da77afc7ee1b296368a5feb8494 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Sun, 17 Nov 2013 14:49:43 -0600 Subject: node: link npm manpages Fixes #22397. --- Library/Formula/node.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Library/Formula') diff --git a/Library/Formula/node.rb b/Library/Formula/node.rb index fdce91443..3eb8ada33 100644 --- a/Library/Formula/node.rb +++ b/Library/Formula/node.rb @@ -74,6 +74,14 @@ class Node < Formula unless build.include? 'without-npm' (lib/"node_modules/npm/npmrc").write("prefix = #{npm_prefix}\n") + + # Link npm manpages + Pathname.glob("#{lib}/node_modules/npm/man/*").each do |man| + dir = send(man.basename) + man.children.each do |file| + dir.install_symlink(file.relative_path_from(dir)) + end + end end end -- cgit v1.2.3