From 3d279ec127bbf81f172d07100efbd9f65735ca1d Mon Sep 17 00:00:00 2001 From: fufesou Date: Fri, 15 Mar 2024 17:46:36 +0800 Subject: [PATCH] fix build (#7397) * fix build Signed-off-by: fufesou * fmt Signed-off-by: fufesou --------- Signed-off-by: fufesou --- libs/hbb_common/src/config.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libs/hbb_common/src/config.rs b/libs/hbb_common/src/config.rs index eb29434a3..f227c95a0 100644 --- a/libs/hbb_common/src/config.rs +++ b/libs/hbb_common/src/config.rs @@ -25,7 +25,6 @@ use crate::{ decrypt_str_or_original, decrypt_vec_or_original, encrypt_str_or_original, encrypt_vec_or_original, symmetric_crypt, }, - platform::linux::run_cmds, }; pub const RENDEZVOUS_TIMEOUT: u64 = 12_000; @@ -403,10 +402,10 @@ fn patch(path: PathBuf) -> PathBuf { #[cfg(target_os = "linux")] { if _tmp == "/root" { - if let Ok(user) = run_cmds("whoami") { + if let Ok(user) = crate::platform::linux::run_cmds("whoami") { if user != "root" { let cmd = format!("getent passwd '{}' | awk -F':' '{{print $6}}'", user); - if let Ok(output) = run_cmds(&cmd) { + if let Ok(output) = crate::platform::linux::run_cmds(&cmd) { return output.into(); } return format!("/home/{user}").into();