Prefer `process.env.XDG_CACHE_HOME` on macOS
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 26
- Forks
- 6
- PR merge metrics
- No merged PRs in 30d
Description
If a user explicitly defines an `XDG_CACHE_HOME`, it should be used. This is already the case on posix systems:
```js
function posix (id) {
const cacheHome = process.env.XDG_CACHE_HOME || path.join(os.homedir(), '.cache')
return path.join(cacheHome, id)
}
```
It would make sense to do the same on darwin/macOS:
```js
function darwin (id) {
const cacheHome = process.env.XDG_CACHE_HOME || path.join(os.homedir(), 'Library', 'Caches')
return path.join(cacheHome, id)
}
```
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the darwin(id) cache-directory implementation described in the issue and compare it with the posix(id) behavior. Verify that an explicitly set XDG_CACHE_HOME is preferred on macOS while the existing Library/Caches fallback remains unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, macos, node.js
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100