Skip to content

Commit

Permalink
fix: always print CARGO_PKG_VERSION (#67)
Browse files Browse the repository at this point in the history
  • Loading branch information
mierak authored Sep 22, 2024
1 parent 3e4951b commit 4ec0772
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,13 @@ fn main() -> Result<()> {
let mpd_host = ENV.var("MPD_HOST").unwrap_or_else(|_| "unset".to_string());
let mpd_port = ENV.var("MPD_PORT").unwrap_or_else(|_| "unset".to_string());

println!("rmpc {}", env!("VERGEN_GIT_DESCRIBE"));
println!(
"rmpc {}{}",
env!("CARGO_PKG_VERSION"),
option_env!("VERGEN_GIT_DESCRIBE")
.map(|g| format!(" git {g}"))
.unwrap_or_default()
);
println!("\n{:<20} {}", "Config path", args.config.as_str()?);
println!("{:<20} {:?}", "Theme path", config_file.theme);

Expand All @@ -125,7 +131,13 @@ fn main() -> Result<()> {
println!("{}", UEBERZUGPP.display());
}
Some(Command::Version) => {
println!("rmpc {}", env!("VERGEN_GIT_DESCRIBE"),);
println!(
"rmpc {}{}",
env!("CARGO_PKG_VERSION"),
option_env!("VERGEN_GIT_DESCRIBE")
.map(|g| format!(" git {g}"))
.unwrap_or_default()
);
}
Some(cmd) => {
let config: &'static Config = Box::leak(Box::new(match ConfigFile::read(&args.config) {
Expand Down

0 comments on commit 4ec0772

Please # to comment.