summaryrefslogtreecommitdiff
path: root/cli/util
diff options
context:
space:
mode:
authorNayeem Rahman <nayeemrmn99@gmail.com>2023-01-10 15:28:10 +0000
committerGitHub <noreply@github.com>2023-01-10 16:28:10 +0100
commit71ea4ef2746d7d75623a821d4832d3531a8e1654 (patch)
tree7d5d9676c5de9b32edcc2aee9a94394e4de2a19f /cli/util
parent0329bc69dabbcc4d57ff9d34d695ffd4ddb1de4f (diff)
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.
Diffstat (limited to 'cli/util')
-rw-r--r--cli/util/file_watcher.rs2
1 files changed, 1 insertions, 1 deletions
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);
},
};