diff --git a/Cargo.toml b/Cargo.toml index ef6afde..dfc98c2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "todoodoo" description = "todoodoo" -version = "0.2.0" +version = "0.2.1" edition = "2021" license = "GPL-3.0-only" diff --git a/src/main.rs b/src/main.rs index 3c0f290..6554388 100644 --- a/src/main.rs +++ b/src/main.rs @@ -40,6 +40,12 @@ impl Display for RunError { impl Error for RunError {} fn main() -> Result<(), RunError> { + for argument in std::env::args() { + if argument == "-v" || argument == "--version" { + println!("CARGO_PKG_VERSION"); + return Ok(()); + } + } std::env::set_var("WINIT_UNIX_BACKEND", "wayland"); let home_dir = homedir::get_my_home() .map_err(RunError::HomeDir)?