File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import { getBlockSyncProgressChannel } from '../ipc/get-block-sync-progress';
77import type { GetBlockSyncProgressType } from '../../common/ipc/api' ;
88import { BlockSyncType } from '../../common/types/cardano-node.types' ;
99import { isItFreshLog } from './blockSyncProgressHelpers' ;
10+ import { environment } from '../environment' ;
1011
1112const blockKeyword = 'Replayed block' ;
1213const validatingChunkKeyword = 'Validating chunk' ;
@@ -52,7 +53,12 @@ export const handleCheckBlockReplayProgress = (
5253 const filePath = path . join ( logFilePath , filename ) ;
5354 if ( ! fs . existsSync ( filePath ) ) return ;
5455
55- const tail = new Tail ( filePath ) ;
56+ const tail = new Tail ( filePath , {
57+ // using fs.watchFile instead of fs.watch on Windows because of Node API inconsistency:
58+ // https://nodejs.org/dist/latest-v14.x/docs/api/fs.html#fs_caveats
59+ // https://github.com/lucagrulla/node-tail/issues/137
60+ useWatchFile : environment . isWindows ,
61+ } ) ;
5662
5763 tail . on ( 'line' , ( line ) => {
5864 if (
You can’t perform that action at this time.
0 commit comments