Skip to content

Commit a1a6c05

Browse files
authored
Merge pull request #220 from rancher-sandbox/fallback-user
Only fallback to "lima" user when host user is invalid
2 parents 30cb59c + 6c8cf7e commit a1a6c05

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/osutil/user.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ func LimaUser(warn bool) (*user.User, error) {
2727
if err := identifiers.Validate(cache.u.Username); err != nil {
2828
cache.warning = fmt.Sprintf("local user %q is not a valid Linux username: %v; using %q username instead",
2929
cache.u.Username, err, fallbackUser)
30+
cache.u.Username = fallbackUser
3031
}
31-
cache.u.Username = fallbackUser
3232
}
3333
})
3434
if warn && cache.warning != "" {

0 commit comments

Comments
 (0)