diff options
Diffstat (limited to 'tools/eslint/node_modules/user-home/index.js')
-rw-r--r-- | tools/eslint/node_modules/user-home/index.js | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/tools/eslint/node_modules/user-home/index.js b/tools/eslint/node_modules/user-home/index.js index d53b7939ae..fdff72164c 100644 --- a/tools/eslint/node_modules/user-home/index.js +++ b/tools/eslint/node_modules/user-home/index.js @@ -1,15 +1,2 @@ 'use strict'; -var env = process.env; -var home = env.HOME; -var user = env.LOGNAME || env.USER || env.LNAME || env.USERNAME; - -if (process.platform === 'win32') { - module.exports = env.USERPROFILE || env.HOMEDRIVE + env.HOMEPATH || home || null; -} else if (process.platform === 'darwin') { - module.exports = home || (user ? '/Users/' + user : null) || null; -} else if (process.platform === 'linux') { - module.exports = home || - (user ? (process.getuid() === 0 ? '/root' : '/home/' + user) : null) || null; -} else { - module.exports = home || null; -} +module.exports = require('os-homedir')(); |