diff options
author | Rebecca Turner <me@re-becca.org> | 2015-07-01 11:32:59 +0300 |
---|---|---|
committer | Rebecca Turner <me@re-becca.org> | 2015-07-01 14:24:53 +0300 |
commit | b259bcc8ba4ad990a7574a1f6fcb506e01966f7e (patch) | |
tree | a853f18784a1d463480ed95081b1f1701dd2ea69 | |
parent | d2239b823cf2627b6356bb796fbbed96121993b5 (diff) |
install: check-permissions: disable access checks on win32
The way this was written was sometimes (always in large installs) resulting
in errors.
PR-URL: https://github.com/npm/npm/pull/8786
-rw-r--r-- | lib/install/check-permissions.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/install/check-permissions.js b/lib/install/check-permissions.js index 7a709d241..6f9e9c8f0 100644 --- a/lib/install/check-permissions.js +++ b/lib/install/check-permissions.js @@ -74,6 +74,16 @@ var exists = fs.access var access = fs.access ? function (dir, done) { fs.access(dir, fs.W_OK, done) } : function (dir, done) { + // FIXME: So it turns out that for larger installations on windows + // this sometimes fails. We need to make this work better. Options + // include: + // caching results + // inflighting results + // limiting concurrency + // Maybe all three. + // That this is going through asyncMap and then running ALL THIS + // makes this failure completely unsurprising. 😕 + if (process.platform === 'win32') return done() var tmp = path.join(dir, '.npm.check.permissions') fs.open(tmp, 'w', function (er, fd) { if (er) return done(accessError(dir, er)) |