Skip to content

Commit 7a4f0c9

Browse files
nlfisaacs
authored andcommitted
tests for npm doctor
PR-URL: #2323 Credit: @nlf Close: #2323 Reviewed-by: @isaacs
1 parent d825e90 commit 7a4f0c9

File tree

2 files changed

+945
-2
lines changed

2 files changed

+945
-2
lines changed

lib/doctor.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const checkPing = async () => {
2020
if (/^E\d{3}$/.test(er.code || ''))
2121
throw er.code.substr(1) + ' ' + er.message
2222
else
23-
throw er
23+
throw er.message
2424
} finally {
2525
tracker.finish()
2626
}
@@ -92,7 +92,7 @@ const lstat = promisify(fs.lstat)
9292
const readdir = promisify(fs.readdir)
9393
const access = promisify(fs.access)
9494
const isWindows = require('./utils/is-windows.js')
95-
const checkFilesPermission = async (root, shouldOwn = true, mask = null) => {
95+
const checkFilesPermission = async (root, shouldOwn, mask = null) => {
9696
if (mask === null)
9797
mask = shouldOwn ? R_OK | W_OK : R_OK
9898

0 commit comments

Comments
 (0)