CVEProject/cvelistV5#124
community suggested fix: CVEProject/cvelistV5#130
There might be a cleaner way to solve the issue with some fs.statSync calls.
Or if going with env var, you could use last time a git-pull was attempted
last_local_cache_pull=$(stat -c %y $(git rev-parse --show-toplevel)/.git/FETCH_HEAD)
- get root of git repo:
git rev-parse --show-toplevel
- get FETCH_HEAD of current git repo:
$(git rev-parse --show-toplevel)/.git/FETCH_HEAD)
- get time of last data modification of a file (human-readable):
stat -c %y <filepath>
https://www.man7.org/linux/man-pages/man1/stat.1.html
%y time of last data modification, human-readable
CVEProject/cvelistV5#124
community suggested fix: CVEProject/cvelistV5#130
There might be a cleaner way to solve the issue with some fs.statSync calls.
Or if going with env var, you could use last time a git-pull was attempted
last_local_cache_pull=$(stat -c %y $(git rev-parse --show-toplevel)/.git/FETCH_HEAD)git rev-parse --show-toplevel$(git rev-parse --show-toplevel)/.git/FETCH_HEAD)stat -c %y <filepath>https://www.man7.org/linux/man-pages/man1/stat.1.html