From cb5ace6797df483621020149eb495d1f61da1cd9 Mon Sep 17 00:00:00 2001 From: Tim D. Smith Date: Sat, 17 Jan 2015 00:01:07 -0800 Subject: node: prefer list form of ln_sf Pass a list to ln_sf instead of iterating over the result of Dir[]. This form raises an error if the second argument is not a directory. Closes #35973. Signed-off-by: Mike McQuaid --- Library/Formula/node.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Library') diff --git a/Library/Formula/node.rb b/Library/Formula/node.rb index b1376df13..4b45c6953 100644 --- a/Library/Formula/node.rb +++ b/Library/Formula/node.rb @@ -100,7 +100,7 @@ class Node < Formula # Dirs must exist first: https://github.com/Homebrew/homebrew/issues/35969 mkdir_p HOMEBREW_PREFIX/"share/man/#{man}" rm_f Dir[HOMEBREW_PREFIX/"share/man/#{man}/{npm.,npm-,npmrc.}*"] - Dir[libexec/"npm/share/man/#{man}/npm*"].each {|f| ln_sf f, HOMEBREW_PREFIX/"share/man/#{man}" } + ln_sf Dir[libexec/"npm/share/man/#{man}/npm*"], HOMEBREW_PREFIX/"share/man/#{man}" end npm_root = node_modules/"npm" -- cgit v1.2.3