summaryrefslogtreecommitdiff
path: root/deps/npm/lib/utils/error-message.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/lib/utils/error-message.js')
-rw-r--r--deps/npm/lib/utils/error-message.js32
1 files changed, 2 insertions, 30 deletions
diff --git a/deps/npm/lib/utils/error-message.js b/deps/npm/lib/utils/error-message.js
index cd31d7d714..85504f5edc 100644
--- a/deps/npm/lib/utils/error-message.js
+++ b/deps/npm/lib/utils/error-message.js
@@ -23,17 +23,8 @@ function errorMessage (er) {
case 'EACCES':
case 'EPERM':
short.push(['', er])
- detail.push([
- '',
- [
- '\nThe operation was rejected by your operating system.',
- (process.platform === 'win32'
- ? 'It\'s possible that the file was already in use (by a text editor or antivirus),\nor that you lack permissions to access it.'
- : 'It is likely you do not have the permissions to access this file as the current user'),
- '\nIf you believe this might be a permissions issue, please double-check the',
- 'permissions of the file and its containing directories, or try running',
- 'the command again as root/Administrator (though this is not recommended).'
- ].join('\n')])
+ detail.push(['', ['\nPlease try running this command again as root/Administrator.'
+ ].join('\n')])
break
case 'ELIFECYCLE':
@@ -61,25 +52,6 @@ function errorMessage (er) {
break
case 'EJSONPARSE':
- const path = require('path')
- // Check whether we ran into a conflict in our own package.json
- if (er.file === path.join(npm.prefix, 'package.json')) {
- const isDiff = require('../install/read-shrinkwrap.js')._isDiff
- const txt = require('fs').readFileSync(er.file, 'utf8')
- if (isDiff(txt)) {
- detail.push([
- '',
- [
- 'Merge conflict detected in your package.json.',
- '',
- 'Please resolve the package.json conflict and retry the command:',
- '',
- `$ ${process.argv.join(' ')}`
- ].join('\n')
- ])
- break
- }
- }
short.push(['', er.message])
short.push(['', 'File: ' + er.file])
detail.push([