MCPcopy Create free account
hub / github.com/PowerShell/DSC / get_computer_name

Function get_computer_name

resources/dism_dsc/src/util.rs:130–132  ·  view source on GitHub ↗

Returns the computer name from the COMPUTERNAME environment variable, or "localhost" as fallback.

()

Source from the content-addressed store, hash-verified

128
129/// Returns the computer name from the COMPUTERNAME environment variable, or "localhost" as fallback.
130pub fn get_computer_name() -> String {
131 std::env::var("COMPUTERNAME").unwrap_or_else(|_| "localhost".to_string())
132}
133
134#[cfg(test)]
135mod tests {

Callers 2

handle_setFunction · 0.50
handle_setFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected