Skip to content

Commit 5a8be7b

Browse files
committed
Add os to verbose version string.
1 parent c5318a1 commit 5a8be7b

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ libgit2-sys = "0.12.24"
4848
memchr = "2.1.3"
4949
num_cpus = "1.0"
5050
opener = "0.5"
51+
os_info = "3.0.7"
5152
percent-encoding = "2.0"
5253
rustfix = "0.6.0"
5354
semver = { version = "1.0.3", features = ["serde"] }

src/bin/cargo/cli.rs

+1
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ pub fn get_version_string(is_verbose: bool) -> String {
178178
add_libgit2(&mut version_string);
179179
add_curl(&mut version_string);
180180
add_ssl(&mut version_string);
181+
writeln!(version_string, "os: {}", os_info::get()).unwrap();
181182
}
182183
version_string
183184
}

tests/testsuite/version.rs

+1
Original file line numberDiff line numberDiff line change
@@ -50,5 +50,6 @@ fn verbose() {
5050
.with_stdout_contains("host: [..]")
5151
.with_stdout_contains("libgit2: [..]")
5252
.with_stdout_contains("libcurl: [..]")
53+
.with_stdout_contains("os: [..]")
5354
.run();
5455
}

0 commit comments

Comments
 (0)