Skip to content

Commit

Permalink
Merge pull request #1148 from joshrwolf/homedir-2
Browse files Browse the repository at this point in the history
ensure homedir respects non-defaults
  • Loading branch information
imjasonh authored May 31, 2024
2 parents c28d867 + 7cc8288 commit f5aa053
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/build/accounts.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,14 @@ func userToUserEntry(user types.User) passwd.UserEntry {
if user.Shell == "" {
user.Shell = "/bin/sh"
}
if user.HomeDir == "" {
user.HomeDir = "/home/" + user.UserName
}
return passwd.UserEntry{
UserName: user.UserName,
UID: user.UID,
GID: user.GID,
HomeDir: "/home/" + user.UserName,
HomeDir: user.HomeDir,
Password: "x",
Info: "Account created by apko",
Shell: user.Shell,
Expand Down

0 comments on commit f5aa053

Please sign in to comment.