diff --git a/src/main.rs b/src/main.rs index f2abc9c..866f9b2 100644 --- a/src/main.rs +++ b/src/main.rs @@ -3,11 +3,13 @@ use clap_nested::{Commander}; mod command; +const VERSION: Option<&'static str> = option_env!("CARGO_PKG_VERSION"); + fn main() { match Commander::new() .options(|app| { app.name("Walkman Tools") - .version("1.0") + .version(VERSION.unwrap_or("UNKNOWN")) .author("Drew Short ") .about("Management tool for walkman mp3 players") .arg( @@ -27,7 +29,7 @@ fn main() { Ok(()) }) .run() { - Ok(result) => std::process::exit(0), + Ok(_) => std::process::exit(0), Err(err) => println!("{}", err) } } \ No newline at end of file