feat(cli): add "--no-clear-screen" flag (#13454)

This commit adds "--no-clear-screen" flag which can be used
with "--watch" flag to disable clearing of terminal screen on
each file change.
This commit is contained in:
Zheyu Zhang 2022-02-01 00:39:39 +08:00 committed by GitHub
parent 3e566bb457
commit 5490cfed20
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 321 additions and 37 deletions

View file

@ -1279,7 +1279,15 @@ pub async fn run_tests_with_watch(
}
};
file_watcher::watch_func(resolver, operation, "Test").await?;
file_watcher::watch_func(
resolver,
operation,
file_watcher::PrintConfig {
job_name: "Test".to_string(),
clear_screen: !flags.no_clear_screen,
},
)
.await?;
Ok(())
}