Move first log message to after cli parsing

So that it doesn't occur during --help etc.
This commit is contained in:
Ivan Molodetskikh
2023-11-24 23:22:53 +04:00
parent ae47f2116d
commit df5512c0a8
+6 -6
View File
@@ -74,12 +74,6 @@ fn main() {
.with_env_filter(env_filter)
.init();
info!(
"starting version {} ({})",
env!("CARGO_PKG_VERSION"),
git_version!(fallback = "unknown commit"),
);
if is_systemd_service {
// If we're starting as a systemd service, assume that the intention is to start on a TTY.
// Remove DISPLAY or WAYLAND_DISPLAY from our environment if they are set, since they will
@@ -98,6 +92,12 @@ fn main() {
let _client = tracy_client::Client::start();
info!(
"starting version {} ({})",
env!("CARGO_PKG_VERSION"),
git_version!(fallback = "unknown commit"),
);
// Load the config.
miette::set_hook(Box::new(|_| Box::new(NarratableReportHandler::new()))).unwrap();
let (mut config, path) = match Config::load(cli.config).context("error loading config") {