feat: print version with -v
or --version
This commit is contained in:
parent
eb5d8b8940
commit
b9108c29b2
2 changed files with 7 additions and 1 deletions
|
@ -1,7 +1,7 @@
|
||||||
[package]
|
[package]
|
||||||
name = "todoodoo"
|
name = "todoodoo"
|
||||||
description = "todoodoo"
|
description = "todoodoo"
|
||||||
version = "0.2.0"
|
version = "0.2.1"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "GPL-3.0-only"
|
license = "GPL-3.0-only"
|
||||||
|
|
||||||
|
|
|
@ -40,6 +40,12 @@ impl Display for RunError {
|
||||||
impl Error for RunError {}
|
impl Error for RunError {}
|
||||||
|
|
||||||
fn main() -> Result<(), 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");
|
std::env::set_var("WINIT_UNIX_BACKEND", "wayland");
|
||||||
let home_dir = homedir::get_my_home()
|
let home_dir = homedir::get_my_home()
|
||||||
.map_err(RunError::HomeDir)?
|
.map_err(RunError::HomeDir)?
|
||||||
|
|
Loading…
Reference in a new issue