Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix: always print CARGO_PKG_VERSION #67

Merged
merged 2 commits into from
Sep 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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