From 78b1126fb474471888309097e80037c14bbe2686 Mon Sep 17 00:00:00 2001 From: Clement Tsang <34804052+ClementTsang@users.noreply.github.com> Date: Mon, 20 Feb 2023 00:57:09 -0500 Subject: [PATCH] other: move terminal check after the config check (#1027) --- src/bin/main.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bin/main.rs b/src/bin/main.rs index 946ca1aa..e6f3bf64 100644 --- a/src/bin/main.rs +++ b/src/bin/main.rs @@ -39,9 +39,6 @@ fn main() -> Result<()> { utils::logging::init_logger(log::LevelFilter::Debug, std::ffi::OsStr::new("debug.log"))?; } - // Check if the current environment is in a terminal. - check_if_terminal(); - // Read from config file. let config_path = read_config(matches.get_one::("config_location")) .context("Unable to access the given config file location.")?; @@ -72,6 +69,9 @@ fn main() -> Result<()> { // Create painter and set colours. let mut painter = canvas::Painter::init(widget_layout, colours)?; + // Check if the current environment is in a terminal. + check_if_terminal(); + // Create termination mutex and cvar #[allow(clippy::mutex_atomic)] let thread_termination_lock = Arc::new(Mutex::new(false));