feat: add version argument

This commit is contained in:
Vukašin Vojinović authored and Michael Murphy committed 2026-09-09 18:32:01 +02:00
1 parent 3bdf11741a
commit d02ced6297
1 file changed
+7
+7
View File
@@ -46,6 +46,13 @@ const ENVIRONMENT_NAME: &'static str = "COSMIC";
#[tokio::main(flavor = "current_thread")]
async fn main() -> Result<()> {
if let Some(arg) = env::args().nth(1)
&& (arg == "--version" || arg == "-V")
{
println!("cosmic-session {}", env!("CARGO_PKG_VERSION"));
return Ok(());
}
color_eyre::install().wrap_err("failed to install color_eyre error handler")?;
let trace = tracing_subscriber::registry();