Skip to content

Commit 87346df

Browse files
committed
Defer uid lookups on Darwin
Signed-off-by: Maksym Pavlenko <[email protected]>
1 parent f7f2be7 commit 87346df

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

oci/spec_opts.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,9 @@ func WithUser(userstr string) SpecOpts {
607607
// The `Username` field on the runtime spec is marked by Platform as only for Windows, and in this case it
608608
// *is* being set on a Windows host at least, but will be used as a temporary holding spot until the guest
609609
// can use the string to perform these same operations to grab the uid:gid inside.
610-
if s.Windows != nil && s.Linux != nil {
610+
//
611+
// Mounts are not supported on Darwin, so using the same workaround.
612+
if (s.Windows != nil && s.Linux != nil) || runtime.GOOS == "darwin" {
611613
s.Process.User.Username = userstr
612614
return nil
613615
}

0 commit comments

Comments
 (0)