Skip to main content

command_identity

Function command_identity 

Source
pub fn command_identity(prefix: &str, stdout: &[u8]) -> Option<String>
Expand description

What: The identity a platform inspector printed, as <prefix>:<trimmed output>, or nothing when it printed only whitespace. &[u8] borrows the raw standard output. Why: On macOS and Windows the incumbent runs a command and trims its output; empty output means the process is gone.

In TS you’d write (pseudocode):

function commandIdentity(prefix: string, stdout: string): string | typeof ABSENT;