diff --git a/pkg/util/command_util.go b/pkg/util/command_util.go index 448a59236e..85b6bba1a8 100644 --- a/pkg/util/command_util.go +++ b/pkg/util/command_util.go @@ -347,7 +347,7 @@ Loop: func GetUserGroup(chownStr string, env []string) (int64, int64, error) { if chownStr == "" { - return DoNotChangeUID, DoNotChangeGID, nil + return 0, 0, nil } chown, err := ResolveEnvironmentReplacement(chownStr, env, false) diff --git a/pkg/util/command_util_test.go b/pkg/util/command_util_test.go index 3d83847711..cd00b18c40 100644 --- a/pkg/util/command_util_test.go +++ b/pkg/util/command_util_test.go @@ -561,8 +561,8 @@ func TestGetUserGroup(t *testing.T) { mockIDGetter: func(string, string, bool) (uint32, uint32, error) { return 0, 0, fmt.Errorf("should not be called") }, - expectedU: -1, - expectedG: -1, + expectedU: 0, + expectedG: 0, }, } for _, tc := range tests {