aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorTim D. Smith2015-01-17 00:01:07 -0800
committerMike McQuaid2015-01-17 18:50:01 +0100
commitcb5ace6797df483621020149eb495d1f61da1cd9 (patch)
tree696ebb18dc64a73ee516566f8259a2c1759df47a /Library
parente3873ed98ec3310f601a5991cd8eadc84c15be9a (diff)
downloadhomebrew-cb5ace6797df483621020149eb495d1f61da1cd9.tar.bz2
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 <mike@mikemcquaid.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/node.rb2
1 files changed, 1 insertions, 1 deletions
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"