Format rust files

This commit is contained in:
Arash Hatami
2021-10-01 22:48:04 +03:30
parent 18b1646cd4
commit 2894a5ab7b
5 changed files with 38 additions and 16 deletions

View File

@@ -153,7 +153,10 @@ fn patch(path: PathBuf) -> PathBuf {
{
if _tmp == "/root" {
if let Ok(output) = std::process::Command::new("whoami").output() {
let user = String::from_utf8_lossy(&output.stdout).to_string().trim().to_owned();
let user = String::from_utf8_lossy(&output.stdout)
.to_string()
.trim()
.to_owned();
if user != "root" {
return format!("/home/{}", user).into();
}