From 71ea4ef2746d7d75623a821d4832d3531a8e1654 Mon Sep 17 00:00:00 2001 From: Nayeem Rahman Date: Tue, 10 Jan 2023 15:28:10 +0000 Subject: fix(watch): preserve `ProcState::file_fetcher` between restarts (#15466) This commit changes "ProcState" to store "file_fetcher" field in an "Arc", allowing it to be preserved between restarts and thus keeping the state alive between the restarts. File watchers for "deno test" and "deno bench" now reset "ProcState" between restarts. --- cli/util/file_watcher.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cli/util') diff --git a/cli/util/file_watcher.rs b/cli/util/file_watcher.rs index b87782d6b..29213f0c9 100644 --- a/cli/util/file_watcher.rs +++ b/cli/util/file_watcher.rs @@ -322,13 +322,13 @@ where continue; }, _ = operation_future => { + consume_paths_to_watch(&mut watcher, &mut paths_to_watch_receiver); // TODO(bartlomieju): print exit code here? info!( "{} {} finished. Restarting on file change...", colors::intense_blue("Watcher"), job_name, ); - consume_paths_to_watch(&mut watcher, &mut paths_to_watch_receiver); }, }; -- cgit v1.2.3