node: add without-completion option
Closes Homebrew/homebrew#26691. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>master
parent
27d947ae71
commit
3fedd98952
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue