diff options
Diffstat (limited to 'go/tools/go_bin_runner')
-rw-r--r-- | go/tools/go_bin_runner/BUILD.bazel | 11 | ||||
-rw-r--r-- | go/tools/go_bin_runner/process.go | 2 | ||||
-rw-r--r-- | go/tools/go_bin_runner/process_unix.go | 11 |
3 files changed, 3 insertions, 21 deletions
diff --git a/go/tools/go_bin_runner/BUILD.bazel b/go/tools/go_bin_runner/BUILD.bazel index a0e26d65..91be016e 100644 --- a/go/tools/go_bin_runner/BUILD.bazel +++ b/go/tools/go_bin_runner/BUILD.bazel @@ -12,18 +12,13 @@ go_library( name = "go_bin_runner_lib", srcs = [ "main.go", - ] + select({ - "@platforms//os:windows": ["process.go"], - "//conditions:default": ["process_unix.go"], - }), + "process.go", + ], importpath = "github.com/bazelbuild/rules_go/go/tools/go_bin_runner", visibility = ["//visibility:private"], deps = [ "//go/runfiles", - ] + select({ - "@platforms//os:windows": [], - "//conditions:default": ["@org_golang_x_sys//unix"], - }), + ], ) go_binary( diff --git a/go/tools/go_bin_runner/process.go b/go/tools/go_bin_runner/process.go index 8b344c96..af236549 100644 --- a/go/tools/go_bin_runner/process.go +++ b/go/tools/go_bin_runner/process.go @@ -1,5 +1,3 @@ -//go:build !unix - package main import ( diff --git a/go/tools/go_bin_runner/process_unix.go b/go/tools/go_bin_runner/process_unix.go deleted file mode 100644 index f59af5d2..00000000 --- a/go/tools/go_bin_runner/process_unix.go +++ /dev/null @@ -1,11 +0,0 @@ -//go:build unix - -package main - -import ( - "golang.org/x/sys/unix" -) - -func ReplaceWithProcess(args, env []string) error { - return unix.Exec(args[0], args, env) -} |