Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib/utils
diff options
context:
space:
mode:
authorGar <gar+gh@danger.computer>2021-09-09 21:14:04 +0300
committerGar <gar+gh@danger.computer>2021-09-09 22:33:55 +0300
commit1ad0938243110d983284e8763da41a57b561563d (patch)
tree831bbabfd64e4e896dabf7fe422245e91a26853e /lib/utils
parenteda9162f2db19b512d3af6b0d43201d54045c13a (diff)
fix(error-message): clean urls from 404 error
If the package being installed is a url it needs to be cleaned before logging so passwords aren't potentially logged. PR-URL: https://github.com/npm/cli/pull/3732 Credit: @wraithgar Close: #3732 Reviewed-by: @nlf
Diffstat (limited to 'lib/utils')
-rw-r--r--lib/utils/error-message.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/utils/error-message.js b/lib/utils/error-message.js
index da97195dd..6e12bcb91 100644
--- a/lib/utils/error-message.js
+++ b/lib/utils/error-message.js
@@ -181,7 +181,7 @@ module.exports = (er, npm) => {
const pkg = er.pkgid.replace(/(?!^)@.*$/, '')
detail.push(['404', ''])
- detail.push(['404', '', "'" + er.pkgid + "' is not in the npm registry."])
+ detail.push(['404', '', `'${replaceInfo(er.pkgid)}' is not in this registry.`])
const valResult = nameValidator(pkg)