Skip to content

Commit

Permalink
runtime: Treat other Unix-es like macos (open-policy-agent#4931)
Browse files Browse the repository at this point in the history
The check specific to macos is also valid on most other Unix-es.

Should fix the build on most other Unix-es.

Signed-off-by: Leonardo Taccari <[email protected]>
  • Loading branch information
iamleot authored Jul 23, 2022
1 parent 646c841 commit 742ca92
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion runtime/check_user_darwin.go → runtime/check_user_unix.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// +build !linux,!windows

// Copyright 2022 The OPA Authors. All rights reserved.
// Use of this source code is governed by an Apache2
// license that can be found in the LICENSE file.
Expand All @@ -10,7 +12,7 @@ import (
"github.com/open-policy-agent/opa/logging"
)

// checkUserPrivileges on macos could not be running in Docker, so we only warn
// checkUserPrivileges could not be running in Docker, so we only warn
// if run as uid/gid 0.
func checkUserPrivileges(logger logging.Logger) {
usr, err := user.Current()
Expand Down

0 comments on commit 742ca92

Please sign in to comment.