summaryrefslogtreecommitdiff
path: root/deps/npm/test/common-tap.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/test/common-tap.js')
-rw-r--r--deps/npm/test/common-tap.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/deps/npm/test/common-tap.js b/deps/npm/test/common-tap.js
index f96f54ebfb..3a9f9d4d28 100644
--- a/deps/npm/test/common-tap.js
+++ b/deps/npm/test/common-tap.js
@@ -29,8 +29,6 @@ process.env.npm_config_legacy_bundling = 'false'
process.env.random_env_var = 'foo'
// suppress warnings about using a prerelease version of node
process.env.npm_config_node_version = process.version.replace(/-.*$/, '')
-// disable metrics for the test suite even if the user has enabled them
-process.env.npm_config_send_metrics = 'false'
var bin = exports.bin = require.resolve('../bin/npm-cli.js')
@@ -49,6 +47,10 @@ exports.npm = function (cmd, opts, cb) {
if (!opts.env.npm_config_cache) {
opts.env.npm_config_cache = npm_config_cache
}
+ if (!opts.env.npm_config_send_metrics) {
+ opts.env.npm_config_send_metrics = 'false'
+ }
+
nodeBin = opts.nodeExecPath || nodeBin
var stdout = ''