From d1962e07afb3761c85cde90bda751c23c144741f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Wed, 30 Nov 2022 23:25:20 +0100 Subject: 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. --- cli/args/mod.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'cli/args') 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() } -- cgit v1.2.3