fix(repl): respect --quiet flag (#16875)

This commit changes REPL behavior to respect --quiet flag. Once 
this flag is present REPL will not print a banner at the start.
This commit is contained in:
Bartek Iwańczuk 2022-11-30 23:25:20 +01:00 committed by GitHub
parent 381932ce1e
commit d1962e07af
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 36 additions and 7 deletions

View file

@ -460,6 +460,13 @@ impl CliOptions {
self.flags.log_level
}
pub fn is_quiet(&self) -> bool {
self
.log_level()
.map(|l| l == log::Level::Error)
.unwrap_or(false)
}
pub fn location_flag(&self) -> Option<&Url> {
self.flags.location.as_ref()
}