From b259bcc8ba4ad990a7574a1f6fcb506e01966f7e Mon Sep 17 00:00:00 2001 From: Rebecca Turner Date: Wed, 1 Jul 2015 04:32:59 -0400 Subject: 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 --- lib/install/check-permissions.js | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lib/install/check-permissions.js') 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)) -- cgit v1.2.3