Skip to content

Commit 635aa46

Browse files
committed
use space, not dash, in cargo --version output
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.
1 parent fdfdb5f commit 635aa46

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cargo/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ pub struct VersionInfo {
7575

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

0 commit comments

Comments
 (0)