style: fix rustfmt formatting for CI
This commit is contained in:
@ -53,11 +53,15 @@ pub fn get_fqdn() -> Result<String> {
|
||||
// 2. Try combining short hostname + domain from `hostname -d`
|
||||
if let Ok(short_output) = Command::new("hostname").output() {
|
||||
if short_output.status.success() {
|
||||
let short = String::from_utf8_lossy(&short_output.stdout).trim().to_string();
|
||||
let short = String::from_utf8_lossy(&short_output.stdout)
|
||||
.trim()
|
||||
.to_string();
|
||||
if !short.is_empty() && short != "(none)" {
|
||||
if let Ok(domain_output) = Command::new("hostname").arg("-d").output() {
|
||||
if domain_output.status.success() {
|
||||
let domain = String::from_utf8_lossy(&domain_output.stdout).trim().to_string();
|
||||
let domain = String::from_utf8_lossy(&domain_output.stdout)
|
||||
.trim()
|
||||
.to_string();
|
||||
if !domain.is_empty() {
|
||||
let fqdn = format!("{}.{}", short, domain);
|
||||
tracing::debug!(fqdn = %fqdn, "Resolved FQDN via hostname + hostname -d");
|
||||
|
||||
@ -16,8 +16,8 @@ pub use client::{
|
||||
};
|
||||
/// Re-export identity extraction functions.
|
||||
pub use identity::{
|
||||
get_fqdn, get_hostname, get_ip_addresses, get_ip_for_interface, get_machine_id,
|
||||
get_os_details, get_primary_ip, get_route_source_ip, is_container_bridge, is_link_local,
|
||||
get_fqdn, get_hostname, get_ip_addresses, get_ip_for_interface, get_machine_id, get_os_details,
|
||||
get_primary_ip, get_route_source_ip, is_container_bridge, is_link_local,
|
||||
};
|
||||
|
||||
/// Run the full enrollment flow against the manager at the given URL.
|
||||
|
||||
Reference in New Issue
Block a user