From b23fe30530ec876fa500a6c4d142696a33d145ab Mon Sep 17 00:00:00 2001 From: Darren Schroeder <343840+fdncred@users.noreply.github.com> Date: Tue, 20 Feb 2024 13:34:11 -0600 Subject: [PATCH] fixes `debug info` not populating process information (#11909) # Description This PR fixes #11901. For some reason `debug info` stopped reporting information. This hopefully fixes it. I think something changes in the `sysinfo` crate that stopped it from working. # User-Facing Changes # Tests + Formatting # After Submitting --- crates/nu-command/src/debug/info.rs | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/crates/nu-command/src/debug/info.rs b/crates/nu-command/src/debug/info.rs index c095af33fc..733aa6c154 100644 --- a/crates/nu-command/src/debug/info.rs +++ b/crates/nu-command/src/debug/info.rs @@ -79,12 +79,7 @@ impl LazySystemInfoRecord { "ppid" => { // only get information requested let system_opt = SystemOpt::from((system_option, || { - RefreshKind::new().with_processes( - ProcessRefreshKind::new() - .without_cpu() - .without_disk_usage() - .without_user(), - ) + RefreshKind::new().with_processes(ProcessRefreshKind::everything()) })); let system = system_opt.get_system(); @@ -117,16 +112,10 @@ impl LazySystemInfoRecord { "process" => { // only get information requested let system_opt = SystemOpt::from((system_option, || { - RefreshKind::new().with_processes( - ProcessRefreshKind::new() - .without_cpu() - .without_disk_usage() - .without_user(), - ) + RefreshKind::new().with_processes(ProcessRefreshKind::everything()) })); let system = system_opt.get_system(); - // get the process information for the nushell pid let pinfo = system.process(pid); if let Some(p) = pinfo { @@ -236,12 +225,7 @@ impl<'a> LazyRecord<'a> for LazySystemInfoRecord { fn collect(&'a self) -> Result { let rk = RefreshKind::new() - .with_processes( - ProcessRefreshKind::new() - .without_cpu() - .without_disk_usage() - .without_user(), - ) + .with_processes(ProcessRefreshKind::everything()) .with_memory(MemoryRefreshKind::everything()); // only get information requested let system = System::new_with_specifics(rk);