Skip to content

Commit

Permalink
tests for npm doctor
Browse files Browse the repository at this point in the history
PR-URL: #2323
Credit: @nlf
Close: #2323
Reviewed-by: @isaacs
  • Loading branch information
nlf authored and isaacs committed Dec 11, 2020
1 parent d825e90 commit 7a4f0c9
Show file tree
Hide file tree
Showing 2 changed files with 945 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/doctor.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const checkPing = async () => {
if (/^E\d{3}$/.test(er.code || ''))
throw er.code.substr(1) + ' ' + er.message
else
throw er
throw er.message
} finally {
tracker.finish()
}
Expand Down Expand Up @@ -92,7 +92,7 @@ const lstat = promisify(fs.lstat)
const readdir = promisify(fs.readdir)
const access = promisify(fs.access)
const isWindows = require('./utils/is-windows.js')
const checkFilesPermission = async (root, shouldOwn = true, mask = null) => {
const checkFilesPermission = async (root, shouldOwn, mask = null) => {
if (mask === null)
mask = shouldOwn ? R_OK | W_OK : R_OK

Expand Down
Loading

0 comments on commit 7a4f0c9

Please sign in to comment.