source: trip-planner-front/node_modules/pacote/lib/util/cache-dir.js@ fa375fe

Last change on this file since fa375fe was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 513 bytes
RevLine 
[6a3a178]1const os = require('os')
2const {resolve} = require('path')
3
4module.exports = (fakePlatform = false) => {
5 const temp = os.tmpdir()
6 const uidOrPid = process.getuid ? process.getuid() : process.pid
7 const home = os.homedir() || resolve(temp, 'npm-' + uidOrPid)
8 const platform = fakePlatform || process.platform
9 const cacheExtra = platform === 'win32' ? 'npm-cache' : '.npm'
10 const cacheRoot = (platform === 'win32' && process.env.LOCALAPPDATA) || home
11 return resolve(cacheRoot, cacheExtra, '_cacache')
12}
Note: See TracBrowser for help on using the repository browser.