-
Notifications
You must be signed in to change notification settings - Fork 116
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
What version are you using?
stellar 23.2.1 ()
stellar-xdr 23.0.0 (e83a6337204ecfdb0ac0d44ffb857130c1249b1b)
xdr curr (4b7a2ef7931ab2ca2499be68d849f38190b443ca)
What did you do?
Run stellar version
What did you expect to see?
Either:
- A git revision hash in the brackets:
stellar 23.2.1 (abc123...) - Or the package manager name if installed that way:
stellar 23.2.1 (Homebrew) - Or if unavailable, no brackets at all:
stellar 23.2.1
What did you see instead?
Empty brackets: stellar 23.2.1 ()
Details
This affects the Homebrew release only, not cargo install releases.
The version output is generated in cmd/soroban-cli/src/commands/version.rs:43:
format!("{} ({})", pkg(), git()),Where git() returns env!("GIT_REVISION") set by crate_git_revision::init() in the build script.
When the git revision isn't available (e.g., installed via Homebrew), the GIT_REVISION is empty, resulting in empty brackets.
Suggested fix
Check if the git revision is empty and conditionally include the package manager name or omit the brackets:
let git_rev = git();
if git_rev.is_empty() {
// Option 1: Show package manager name (preferred)
format!("{} (Homebrew)", pkg())
// Option 2: Omit brackets entirely
// format!("{}", pkg())
} else {
format!("{} ({})", pkg(), git_rev)
}Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Type
Projects
Status
Done