Last 12 weeks · 0 commits
4 of 6 standards met
I'm hardening the Docker image of my Node.js app by making the whole app owned by root but run it as another user so that it cannot modify itself. To make the cache work, only the folder is owned by the app user. Currently, with the changes introduced by #10, returns if is not writable. Here is how I think the permission check should work instead if is found: If exists: If it is writeable, return , otherwise return Otherwise, if exists: If it is writeable, return , otherwise return Otherwise: If is writeable, return , otherwise return As a workaround for now, I can specify the cache dir using the environment variable.
Hi. I'm using some packages using find-cache-dir and needed to have the cache out from node_modules. I did not find this mentioned, so I'd like to have it clarified. Many systems already have a standard cache directory. It is specified at https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html. Namely one specified by $XDG_CACHE_HOME with default at $HOME/.cache For Windows the folder should be under %LOCALAPPDATA%. Known folders on Windows are specified at https://docs.microsoft.com/en-us/windows/win32/shell/knownfolderid. The "Finds the common standard cache directory" at top of readme.md does not really specify the scope of the cache directory. Common across packages in one project, projects of the user, or shared between users? If it is intended to be per project, the above locations can not be used without using some kind of project specific subfolder. If it is intended to work only for one project, I would like to see CACHE_DIR defined to point out that it should have different value for each project.
Repository: sindresorhus/find-cache-directory. Description: Finds the common standard cache directory Stars: 163, Forks: 25. Primary language: JavaScript. Languages: JavaScript (89.5%), TypeScript (10.5%). License: MIT. Topics: cache, nodejs, npm. Latest release: v6.0.0 (1y ago). Open PRs: 0, open issues: 0. Last activity: 1y ago. Community health: 85%. Top contributors: sindresorhus, jamestalmage, Richienb, coreyfarrell, smondal, BrainBacon, hzoo, thangngoc89, LinusU, ndelangen and others.