Rebuild if command line argument is set

pull/3598/head
Woody 2024-01-07 22:06:20 +01:00
rodzic 0a9145cd3c
commit 21de9e938a
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 9872D7F5072789B2
1 zmienionych plików z 4 dodań i 0 usunięć

Wyświetl plik

@ -44,6 +44,10 @@ function saveCache(file) {
}
function isCached(file) {
// If command line argument is set, always rebuild
if (process.argv[2] == "--force" || process.argv[2] == "-f") {
return false;
}
const stat = fs.statSync(file);
const cached = cache[file];
if (cached && cached.mtime >= stat.mtimeMs && cached.size == stat.size) {