node: add without-completion option

Closes Homebrew/homebrew#26691.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
master
Lukas 2014-02-13 12:59:22 +00:00 committed by Mike McQuaid
parent 27d947ae71
commit 3fedd98952
1 changed files with 5 additions and 2 deletions

View File

@ -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