Skip to content

Commit

Permalink
use space, not dash, in cargo --version output
Browse files Browse the repository at this point in the history
 rust-lang#3604 inadvertently changed the output format of `cargo --version`:

```
froydnj@hawkeye:~/src/cargo.git$ ./target/x86_64-unknown-linux-gnu/release/cargo --version
cargo-0.17.0-dev (ae4a4d8 2017-01-27)
froydnj@hawkeye:~/src/cargo.git$ cargo --version
cargo 0.16.0-nightly (6e0c18c 2017-01-27)
```

Note the dash between cargo and the version number in the newer version.

Let's put the space back to not break things that might depend on the
`--version` output.
  • Loading branch information
froydnj committed Feb 17, 2017
1 parent fdfdb5f commit 635aa46
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cargo/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ pub struct VersionInfo {

impl fmt::Display for VersionInfo {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "cargo-{}.{}.{}",
write!(f, "cargo {}.{}.{}",
self.major, self.minor, self.patch)?;
match self.cfg_info.as_ref().map(|ci| &ci.release_channel) {
Some(channel) => {
Expand Down

0 comments on commit 635aa46

Please sign in to comment.