mirror of
https://github.com/denoland/deno.git
synced 2025-09-26 12:19:12 +00:00
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:
parent
381932ce1e
commit
d1962e07af
3 changed files with 36 additions and 7 deletions
|
@ -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()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue