Created by: ehsankhfr
Fix #9970 (closed) Fix #10161 (closed)
As mentioned in https://github.com/facebook/create-react-app/pull/9977#discussion_r515618643, likewise eslint-loader, we need to support non-existing OR inaccessible path fallback for cache folder into os.tempdir, as current(new) eslint plugin doesn't support the fallback.
TEST PLAN:
To test how permission issue folder fallback works:
- under the
node_module- Remove the
.cachefolder content, if folder exists. - Or, create
.cachefolder
- Remove the
- run
chmod u=r--,g=r--,o=r-- node_modules/.cache - run
npm start -
ls node_modules/.cacheshould not show the.eslintcachefile
To test how non-existent folder fallback works:
- under the
node_module- Remove the
.cachefolder content, if folder exists
- Remove the
- run
npm start -
ls node_modules/.cacheshould not show the.eslintcachefile
To test how normal flow of caching works:
- under the
node_module- Make sure the
.cachefolder exists - Make sure there is enough access to the folder
.cache:chmod u=rwx,g=r-x,o=r-x node_modules/.cache
- Make sure the
- run
npm start -
ls node_modules/.cacheshould show the.eslintcachefile