diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2022-11-30 23:25:20 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-30 23:25:20 +0100 |
commit | d1962e07afb3761c85cde90bda751c23c144741f (patch) | |
tree | c65d5adfe28427d06a51de1d9c3c13923ee2b95c /cli/args/mod.rs | |
parent | 381932ce1e79f38bbf8bdf28b4e808038aead7a7 (diff) |
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.
Diffstat (limited to 'cli/args/mod.rs')
-rw-r--r-- | cli/args/mod.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/cli/args/mod.rs b/cli/args/mod.rs index d1ff39f98..38e0abea0 100644 --- a/cli/args/mod.rs +++ b/cli/args/mod.rs @@ -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() } |