aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorEric N. Vander Weele2014-10-30 10:28:13 -0700
committerMike McQuaid2014-10-31 10:04:42 +0000
commitdb46175169b78ac545cafbf9c40fa9ba7d9f8e50 (patch)
treea7ea2038c0a2083c58d3afed00927d6f24bc58da /Library/Formula
parent95961ab191e26ae43b35165cabbab942652ccefe (diff)
downloadhomebrew-db46175169b78ac545cafbf9c40fa9ba7d9f8e50.tar.bz2
node: set npm loglevel temporarily for postinstall
This change avoids setting 'loglevel' in the npm builtin npmrc file. Setting the log level to 'verbose' is intended only for the postinstall step and is not desired to be persistent. Closes #33756. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/node.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/Library/Formula/node.rb b/Library/Formula/node.rb
index 389124783..4ca003b94 100644
--- a/Library/Formula/node.rb
+++ b/Library/Formula/node.rb
@@ -68,10 +68,10 @@ class Node < Formula
npm_root = node_modules/"npm"
npmrc = npm_root/"npmrc"
- npmrc.atomic_write <<-EOS.undent
- prefix = #{HOMEBREW_PREFIX}
- loglevel = verbose
- EOS
+ npmrc.atomic_write("prefix = #{HOMEBREW_PREFIX}\n")
+
+ # set log level temporarily for npm's `make install`
+ ENV["NPM_CONFIG_LOGLEVEL"] = "verbose"
# make sure npm can find node
ENV["PATH"] = "#{opt_bin}:#{ENV["PATH"]}"