summaryrefslogtreecommitdiff
path: root/deps/npm/lib/utils
diff options
context:
space:
mode:
authorKat Marchán <kzm@zkat.tech>2018-07-18 13:55:52 -0700
committerMichaël Zasso <targos@protonmail.com>2018-07-29 14:16:56 +0200
commit5842366ae83a36065d626e3937ad8fc327efab30 (patch)
tree663eb6d493b00788d83d7a71fc2489adabd24527 /deps/npm/lib/utils
parent2aca0957f46af0be33368a1fcb398e63a35c46ef (diff)
downloadandroid-node-v8-5842366ae83a36065d626e3937ad8fc327efab30.tar.gz
android-node-v8-5842366ae83a36065d626e3937ad8fc327efab30.tar.bz2
android-node-v8-5842366ae83a36065d626e3937ad8fc327efab30.zip
deps: upgrade npm to 6.2.0
PR-URL: https://github.com/nodejs/node/pull/21592 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'deps/npm/lib/utils')
-rw-r--r--deps/npm/lib/utils/did-you-mean.js11
-rw-r--r--deps/npm/lib/utils/error-handler.js2
-rw-r--r--deps/npm/lib/utils/error-message.js2
-rw-r--r--deps/npm/lib/utils/is-windows-bash.js3
4 files changed, 8 insertions, 10 deletions
diff --git a/deps/npm/lib/utils/did-you-mean.js b/deps/npm/lib/utils/did-you-mean.js
index 8e72dde5fa..479f04755d 100644
--- a/deps/npm/lib/utils/did-you-mean.js
+++ b/deps/npm/lib/utils/did-you-mean.js
@@ -1,19 +1,16 @@
var meant = require('meant')
-var output = require('./output.js')
function didYouMean (scmd, commands) {
var bestSimilarity = meant(scmd, commands).map(function (str) {
return ' ' + str
})
- if (bestSimilarity.length === 0) return
+ if (bestSimilarity.length === 0) return ''
if (bestSimilarity.length === 1) {
- output('\nDid you mean this?\n' + bestSimilarity[0])
+ return '\nDid you mean this?\n' + bestSimilarity[0]
} else {
- output(
- ['\nDid you mean one of these?']
- .concat(bestSimilarity.slice(0, 3)).join('\n')
- )
+ return ['\nDid you mean one of these?']
+ .concat(bestSimilarity.slice(0, 3)).join('\n')
}
}
diff --git a/deps/npm/lib/utils/error-handler.js b/deps/npm/lib/utils/error-handler.js
index 6631c10743..c6481abf67 100644
--- a/deps/npm/lib/utils/error-handler.js
+++ b/deps/npm/lib/utils/error-handler.js
@@ -57,7 +57,7 @@ process.on('exit', function (code) {
log.error('', 'cb() never called!')
console.error('')
log.error('', 'This is an error with npm itself. Please report this error at:')
- log.error('', ' <https://github.com/npm/npm/issues>')
+ log.error('', ' <https://npm.community>')
writeLogFile()
}
diff --git a/deps/npm/lib/utils/error-message.js b/deps/npm/lib/utils/error-message.js
index 60f52bfc93..6e14898183 100644
--- a/deps/npm/lib/utils/error-message.js
+++ b/deps/npm/lib/utils/error-message.js
@@ -348,7 +348,7 @@ function errorMessage (er) {
'typeerror',
[
'This is an error with npm itself. Please report this error at:',
- ' <https://github.com/npm/npm/issues>'
+ ' <https://npm.community>'
].join('\n')
])
break
diff --git a/deps/npm/lib/utils/is-windows-bash.js b/deps/npm/lib/utils/is-windows-bash.js
index bc4ac7db49..0a6c179680 100644
--- a/deps/npm/lib/utils/is-windows-bash.js
+++ b/deps/npm/lib/utils/is-windows-bash.js
@@ -1,3 +1,4 @@
'use strict'
var isWindows = require('./is-windows.js')
-module.exports = isWindows && /^MINGW(32|64)$/.test(process.env.MSYSTEM)
+module.exports = isWindows &&
+ (/^MINGW(32|64)$/.test(process.env.MSYSTEM) || process.env.TERM === 'cygwin')