refactor(cli/tools): move flag and config logic to CliOptions (#17008)

Co-authored-by: David Sherret <dsherret@gmail.com>
This commit is contained in:
Geert-Jan Zwiers 2023-01-07 21:22:09 +01:00 committed by GitHub
parent fac6447815
commit 84ef26ac9b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 914 additions and 772 deletions

View file

@ -107,9 +107,13 @@ where
log::debug!("File change ignored")
}
ResolutionResult::Restart {
paths_to_watch,
mut paths_to_watch,
result,
} => {
// watch the current directory when empty
if paths_to_watch.is_empty() {
paths_to_watch.push(PathBuf::from("."));
}
return (paths_to_watch, result);
}
}
@ -190,9 +194,13 @@ where
print_after_restart();
}
ResolutionResult::Restart {
paths_to_watch: paths,
paths_to_watch: mut paths,
result,
} => {
// watch the current directory when empty
if paths.is_empty() {
paths.push(PathBuf::from("."));
}
paths_to_watch = paths;
resolution_result = result;
}