From 87c7898b65408d5520be31da693050a5c4547ffc Mon Sep 17 00:00:00 2001 From: Darren Schroeder <343840+fdncred@users.noreply.github.com> Date: Sat, 30 Jan 2021 12:21:32 -0600 Subject: [PATCH] update sysinfo due to breaking change with get_version (#2988) --- Cargo.lock | 4 ++-- crates/nu_plugin_ps/Cargo.toml | 2 +- crates/nu_plugin_sys/Cargo.toml | 2 +- crates/nu_plugin_sys/src/sys.rs | 13 +++++++++++-- 4 files changed, 15 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 07ea81a01f..a9289a06d1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -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", diff --git a/crates/nu_plugin_ps/Cargo.toml b/crates/nu_plugin_ps/Cargo.toml index b1b62d5750..f65b633407 100644 --- a/crates/nu_plugin_ps/Cargo.toml +++ b/crates/nu_plugin_ps/Cargo.toml @@ -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] diff --git a/crates/nu_plugin_sys/Cargo.toml b/crates/nu_plugin_sys/Cargo.toml index 0083c99fca..7fb5a30881 100644 --- a/crates/nu_plugin_sys/Cargo.toml +++ b/crates/nu_plugin_sys/Cargo.toml @@ -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] diff --git a/crates/nu_plugin_sys/src/sys.rs b/crates/nu_plugin_sys/src/sys.rs index cbbe77ae19..b8bf9a6c08 100644 --- a/crates/nu_plugin_sys/src/sys.rs +++ b/crates/nu_plugin_sys/src/sys.rs @@ -115,8 +115,17 @@ pub fn host(sys: &mut System, tag: Tag) -> Option { 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(