Skip to content

Commit

Permalink
Set the nixbld users' realname before marking it as hidden
Browse files Browse the repository at this point in the history
  • Loading branch information
grahamc committed Dec 7, 2024
1 parent c620f20 commit 9a9d043
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions src/action/base/create_user.rs
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,14 @@ async fn create_user_macos(name: &str, uid: u32, gid: u32) -> Result<(), ActionE
"/sbin/nologin",
])
.await?;
execute_dscl_retry_on_specific_errors(&[
".",
"-create",
&format!("/Users/{name}"),
"RealName",
name,
])
.await?;
execute_dscl_retry_on_specific_errors(&[
".",
"-create",
Expand All @@ -343,15 +351,6 @@ async fn create_user_macos(name: &str, uid: u32, gid: u32) -> Result<(), ActionE
Err(e)
})?;

execute_dscl_retry_on_specific_errors(&[
".",
"-create",
&format!("/Users/{name}"),
"RealName",
name,
])
.await?;

Ok(())
}

Expand Down

0 comments on commit 9a9d043

Please sign in to comment.