Skip to content

Commit ac899ec

Browse files
authored
fix: remove duplicate package name in version output (dora-rs#1312)
Fixes the duplicate "dora-cli" text in the version output. Clap automatically prepends the package name when displaying version info, so we don't need to include it in our custom version string. This was causing the output to show "dora-cli dora-cli 0.4.0". Also added colons after package names for better readability. Related to dora-rs#1307 Generated with [Claude Code](https://claude.ai/code) Sorry
2 parents ddb0173 + 43f3f7e commit ac899ec

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

binaries/cli/src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,15 @@ fn get_version_info() -> clap::builder::Str {
3232
fn build_version_string() -> String {
3333
let cli_version = env!("CARGO_PKG_VERSION");
3434

35-
let mut version_output = format!("dora-cli {}\n", cli_version);
35+
let mut version_output = format!("{}\n", cli_version);
3636

3737
// Add dora-message version
38-
version_output.push_str(&format!("dora-message {}\n", dora_message::VERSION));
38+
version_output.push_str(&format!("dora-message: {}\n", dora_message::VERSION));
3939

4040
// Try to detect Python dora-rs version
4141
match get_python_dora_version() {
4242
Some(python_version) => {
43-
version_output.push_str(&format!("dora-rs (Python) {}\n", python_version));
43+
version_output.push_str(&format!("dora-rs (Python): {}\n", python_version));
4444

4545
// Check for version mismatch
4646
if python_version != cli_version {
@@ -52,7 +52,7 @@ fn build_version_string() -> String {
5252
}
5353
}
5454
None => {
55-
version_output.push_str("dora-rs (Python) not found\n");
55+
version_output.push_str("dora-rs (Python): not found\n");
5656
}
5757
}
5858

0 commit comments

Comments
 (0)