]> git.proxmox.com Git - cargo.git/commitdiff
use space, not dash, in `cargo --version` output
authorNathan Froyd <froydnj@gmail.com>
Fri, 17 Feb 2017 16:44:44 +0000 (11:44 -0500)
committerNathan Froyd <froydnj@gmail.com>
Fri, 17 Feb 2017 16:44:44 +0000 (11:44 -0500)
 #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.

src/cargo/lib.rs

index 9da4379f8dfc604236f3051680206469002cea1f..455ffd4238bace8f92fb368b72d37cb596328af4 100755 (executable)
@@ -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) => {