update sysinfo due to breaking change with get_version (#2988)

This commit is contained in:
Darren Schroeder 2021-01-30 12:21:32 -06:00 committed by GitHub
parent 44e088c6fe
commit 87c7898b65
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 6 deletions

4
Cargo.lock generated
View File

@ -5272,9 +5272,9 @@ dependencies = [
[[package]]
name = "sysinfo"
version = "0.15.9"
version = "0.15.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "de94457a09609f33fec5e7fceaf907488967c6c7c75d64da6a7ce6ffdb8b5abd"
checksum = "dd024ccff6b09c6be38d41f168b7f3e132bac86338ee4b24fa485caf601ee158"
dependencies = [
"cc",
"cfg-if 1.0.0",

View File

@ -19,6 +19,6 @@ num-bigint = "0.3.0"
futures = {version = "0.3.5", features = ["compat", "io-compat"]}
futures-timer = "3.0.2"
sysinfo = "0.15.9"
sysinfo = "0.15.11"
[build-dependencies]

View File

@ -18,6 +18,6 @@ nu-source = { path = "../nu-source", version = "0.26.0" }
futures = { version = "0.3.5", features = ["compat", "io-compat"] }
futures-util = "0.3.5"
num-bigint = "0.3.0"
sysinfo = "0.15.9"
sysinfo = "0.15.11"
[build-dependencies]

View File

@ -115,8 +115,17 @@ pub fn host(sys: &mut System, tag: Tag) -> Option<UntaggedValue> {
if let Some(name) = sys.get_name() {
dict.insert_untagged("name", UntaggedValue::string(trim_cstyle_null(name)));
}
if let Some(version) = sys.get_version() {
dict.insert_untagged("version", UntaggedValue::string(trim_cstyle_null(version)));
if let Some(version) = sys.get_os_version() {
dict.insert_untagged(
"os version",
UntaggedValue::string(trim_cstyle_null(version)),
);
}
if let Some(version) = sys.get_kernel_version() {
dict.insert_untagged(
"kernel version",
UntaggedValue::string(trim_cstyle_null(version)),
);
}
if let Some(hostname) = sys.get_host_name() {
dict.insert_untagged(