Updates
This commit is contained in:
Vendored
+3
-3
@@ -72,16 +72,16 @@ function watchFiles(_a) {
|
||||
fs_1.default.watchFile(filePath, {
|
||||
interval: interval || 200,
|
||||
}, (curr, prev) => {
|
||||
if (global.SYNCING)
|
||||
if (fs_1.default.existsSync(global.SYNCING_FILE))
|
||||
return;
|
||||
const INTERVAL = (options === null || options === void 0 ? void 0 : options.interval)
|
||||
? options.interval
|
||||
: UPDATE_TIMEOUT;
|
||||
clearTimeout(timeout);
|
||||
timeout = setTimeout(() => {
|
||||
global.SYNCING = true;
|
||||
fs_1.default.writeFileSync(global.SYNCING_FILE, `SYNCING FILE: curr:${curr} :: prev:${prev}`);
|
||||
sync({ options, filePath, files });
|
||||
process.exit(1);
|
||||
process.exit(global.SYNC_SUCCESS_EXIT_CODE);
|
||||
}, INTERVAL);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user