Function build_data::get_hostname

source ·
pub fn get_hostname() -> Result<String, String>
Expand description

Gets the name of the current machine.

Cargo doesn’t pass the HOSTNAME env var to build scripts. Uses the hostname command.

§Errors

Returns an error if it fails to execute the hostname command.