Added rescue FormulaUnavailableError to setup_npm_environment

This commit is contained in:
mansimarkaur 2017-06-19 01:26:52 +05:30
parent 837ffa209c
commit f8f239686d

View File

@ -25,7 +25,11 @@ module Language
npmrc.write npm_cache_config npmrc.write npm_cache_config
# explicitly use our npm and node-gyp executables instead of the user # explicitly use our npm and node-gyp executables instead of the user
# managed ones in HOMEBREW_PREFIX/lib/node_modules which might be broken # managed ones in HOMEBREW_PREFIX/lib/node_modules which might be broken
begin
ENV.prepend_path "PATH", Formula["node"].opt_libexec/"bin" ENV.prepend_path "PATH", Formula["node"].opt_libexec/"bin"
rescue FormulaUnavailableError
nil
end
end end
def self.std_npm_install_args(libexec) def self.std_npm_install_args(libexec)