aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/language/node.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/Library/Homebrew/language/node.rb b/Library/Homebrew/language/node.rb
index 47431e8e5..01d41041b 100644
--- a/Library/Homebrew/language/node.rb
+++ b/Library/Homebrew/language/node.rb
@@ -25,7 +25,11 @@ module Language
npmrc.write npm_cache_config
# explicitly use our npm and node-gyp executables instead of the user
# managed ones in HOMEBREW_PREFIX/lib/node_modules which might be broken
- ENV.prepend_path "PATH", Formula["node"].opt_libexec/"bin"
+ begin
+ ENV.prepend_path "PATH", Formula["node"].opt_libexec/"bin"
+ rescue FormulaUnavailableError
+ nil
+ end
end
def self.std_npm_install_args(libexec)