(category: 'cache' | 'config')
| 27 | (platform() === 'darwin' && join(home, 'Library', 'Caches', dirname)) || undefined |
| 28 | |
| 29 | const dir = (category: 'cache' | 'config'): string => { |
| 30 | const base = process.env[`XDG_${category.toUpperCase()}_HOME`] || |
| 31 | (onWindows && process.env.LOCALAPPDATA) || join(home, '.' + category) |
| 32 | return join(base, dirname) |
| 33 | } |
| 34 | |
| 35 | return { oldConfigDir: dir('config'), oldCacheDir: macosCacheDir() || dir('cache') } |
| 36 | } |