handle version printing correctly

This commit is contained in:
Valerie Wolfe 2022-06-27 21:48:09 -04:00
parent 594345785b
commit 027eb64ddc
3 changed files with 3 additions and 5 deletions

2
Cargo.lock generated
View file

@ -13,7 +13,7 @@ dependencies = [
[[package]]
name = "config"
version = "0.1.0"
version = "0.1.1"
dependencies = [
"regex",
"toml",

View file

@ -1,6 +1,6 @@
[package]
name = "config"
version = "0.1.1"
version = "0.1.2"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

View file

@ -16,8 +16,6 @@ use toml::Value;
mod error;
pub const VERSION: &str = "0.1.1";
fn main() -> Result<(), Box<dyn Error>>{
let home_dir = var("HOME").unwrap();
let mut config_path = PathBuf::from(&home_dir);
@ -161,7 +159,7 @@ fn main() -> Result<(), Box<dyn Error>>{
}
fn help_text() {
println!("config v{}", VERSION);
println!("config v{}", env!("CARGO_PKG_VERSION"));
println!("Valerie Wolfe <sleeplessval@gmail.com>");
println!("A configuration manager written in Rust.\n");
println!("USAGE:");