From: Martina Ferrari <tina@tina.pm>
Date: Sun, 18 May 2025 13:54:48 +0100
Subject: Revert commit 688cb6ef to avoid new dependency

Forwarded: not-needed
---
 internal/mtail/exec_integration_test.go | 24 ++++++++++++++++++++----
 1 file changed, 20 insertions(+), 4 deletions(-)

diff --git a/internal/mtail/exec_integration_test.go b/internal/mtail/exec_integration_test.go
index e81e657..4e9b190 100644
--- a/internal/mtail/exec_integration_test.go
+++ b/internal/mtail/exec_integration_test.go
@@ -5,21 +5,37 @@ package mtail_test
 
 import (
 	"context"
+	"errors"
 	"fmt"
 	"os/exec"
+	"path/filepath"
 	"syscall"
 	"testing"
 	"time"
 
-	"github.com/bazelbuild/rules_go/go/tools/bazel"
+	"github.com/golang/glog"
 	"github.com/jaqx0r/mtail/internal/testutil"
 )
 
+var mtailPath string
+
+func init() {
+	path, err := exec.LookPath(filepath.Join("..", "..", "mtail"))
+	if errors.Is(err, exec.ErrDot) {
+		err = nil
+	}
+	if err != nil {
+		glog.Infof("exec_integration_test init(): %v", err)
+	}
+	mtailPath = path
+}
+
 func TestExecMtail(t *testing.T) {
-	mtailPath, ok := bazel.FindBinary("cmd/mtail", "mtail")
-	if !ok {
-		t.Fatal("`mtail` not found in runfiles")
+	if mtailPath == "" {
+		t.Log("mtail binary not found, skipping")
+		t.Skip()
 	}
+
 	cs := []string{
 		"-progs",
 		"../../examples",
