Fixes the crash for ps --full
in Windows (#1514)
* Fixes the crash for `ps --full` in Windows * Update ps.rs
This commit is contained in:
parent
36b5d063c1
commit
53c8185af3
|
@ -66,6 +66,8 @@ pub async fn ps(tag: Tag, full: bool) -> Vec<Value> {
|
||||||
dict.insert_untagged("exe", UntaggedValue::string(exe.to_string_lossy()))
|
dict.insert_untagged("exe", UntaggedValue::string(exe.to_string_lossy()))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(not(windows))]
|
||||||
|
{
|
||||||
if let Ok(command) = process.command().await {
|
if let Ok(command) = process.command().await {
|
||||||
dict.insert_untagged(
|
dict.insert_untagged(
|
||||||
"command",
|
"command",
|
||||||
|
@ -73,6 +75,7 @@ pub async fn ps(tag: Tag, full: bool) -> Vec<Value> {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
output.push(dict.into_value());
|
output.push(dict.into_value());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user