diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2023-06-15 13:09:37 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-15 13:09:37 -0400 |
commit | fa63fd4610fbe4a1d95c4da776e4a1cfa8f8e0b9 (patch) | |
tree | c23b95ed50ed20351b543c900cc970cd9e382ac1 /cli/tools/test.rs | |
parent | b2e546e530374ca9456aa3f6ff195c3384b32f24 (diff) |
refactor(flags): move watch flags into subcommand structs (#19516)
Moves the watch setting out of the `Flags` struct and into the
individual subcommands
Diffstat (limited to 'cli/tools/test.rs')
-rw-r--r-- | cli/tools/test.rs | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/cli/tools/test.rs b/cli/tools/test.rs index 159de8ec8..dc48ab9e5 100644 --- a/cli/tools/test.rs +++ b/cli/tools/test.rs @@ -1726,12 +1726,15 @@ pub async fn run_tests_with_watch( } }); - let clear_screen = !flags.no_clear_screen; file_watcher::watch_func( flags, file_watcher::PrintConfig { job_name: "Test".to_string(), - clear_screen, + clear_screen: !test_flags + .watch + .as_ref() + .map(|w| !w.no_clear_screen) + .unwrap_or(true), }, move |flags, sender, changed_paths| { let test_flags = test_flags.clone(); @@ -1743,9 +1746,7 @@ pub async fn run_tests_with_watch( let cli_options = factory.cli_options(); let test_options = cli_options.resolve_test_options(test_flags)?; - if let Some(watch_paths) = cli_options.watch_paths() { - let _ = sender.send(watch_paths); - } + let _ = sender.send(cli_options.watch_paths()); let _ = sender.send(test_options.files.include.clone()); let graph_kind = cli_options.type_check_mode().as_graph_kind(); |