We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 785e527 commit 1186e89Copy full SHA for 1186e89
1 file changed
lib/install.js
@@ -370,7 +370,12 @@ function install (fs, gyp, argv, callback) {
370
}
371
var tmpdir = os.tmpdir()
372
gyp.devDir = path.resolve(tmpdir, '.node-gyp')
373
- log.warn('EACCES', 'user "%s" does not have permission to access the dev dir "%s"', os.userInfo().username, devDir)
+ var userString = ''
374
+ try {
375
+ // os.userInfo can fail on some systems, it's not critical here
376
+ userString = ` ("${os.userInfo().username}")`
377
+ } catch (e) {}
378
+ log.warn('EACCES', 'current user%s does not have permission to access the dev dir "%s"', userString, devDir)
379
log.warn('EACCES', 'attempting to reinstall using temporary dev dir "%s"', gyp.devDir)
380
if (process.cwd() === tmpdir) {
381
log.verbose('tmpdir == cwd', 'automatically will remove dev files after to save disk space')
0 commit comments