aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/node.rb
diff options
context:
space:
mode:
authorLukas2014-02-13 12:59:22 +0000
committerMike McQuaid2014-02-13 12:59:22 +0000
commitfa0f4d7dd6f96b6eda110f8131805d68d1a01390 (patch)
tree655a48ded1e1cc7eeff1760e73d421fdf498314a /Library/Formula/node.rb
parent2ad3e7578ee3facf3181ed223bc4620cb0172db1 (diff)
downloadhomebrew-fa0f4d7dd6f96b6eda110f8131805d68d1a01390.tar.bz2
node: add without-completion option
Closes #26691. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library/Formula/node.rb')
-rw-r--r--Library/Formula/node.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/Library/Formula/node.rb b/Library/Formula/node.rb
index c180ec029..1f731e2d6 100644
--- a/Library/Formula/node.rb
+++ b/Library/Formula/node.rb
@@ -44,6 +44,7 @@ class Node < Formula
option 'enable-debug', 'Build with debugger hooks'
option 'without-npm', 'npm will not be installed'
+ option 'without-completion', 'npm bash completion will not be installed'
depends_on NpmNotInstalled unless build.without? 'npm'
depends_on :python
@@ -72,8 +73,10 @@ class Node < Formula
end
end
- # install bash completion
- bash_completion.install lib/"node_modules/npm/lib/utils/completion.sh" => 'npm'
+ if build.with? "completion"
+ bash_completion.install_symlink \
+ lib/"node_modules/npm/lib/utils/completion.sh" => "npm"
+ end
end
end