Defer uid lookups on Darwin
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
This commit is contained in:
parent
f7f2be7321
commit
87346df54f
@ -607,7 +607,9 @@ func WithUser(userstr string) SpecOpts {
|
||||
// The `Username` field on the runtime spec is marked by Platform as only for Windows, and in this case it
|
||||
// *is* being set on a Windows host at least, but will be used as a temporary holding spot until the guest
|
||||
// can use the string to perform these same operations to grab the uid:gid inside.
|
||||
if s.Windows != nil && s.Linux != nil {
|
||||
//
|
||||
// Mounts are not supported on Darwin, so using the same workaround.
|
||||
if (s.Windows != nil && s.Linux != nil) || runtime.GOOS == "darwin" {
|
||||
s.Process.User.Username = userstr
|
||||
return nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user