From 1f1c87d0541dd74dbb6ca85410c94cc9c0131d93 Mon Sep 17 00:00:00 2001 From: rsteube Date: Fri, 22 Dec 2023 09:54:42 +0100 Subject: [PATCH] carapace: remove tmpdir check --- pkg/actions/bridge/carapace.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/actions/bridge/carapace.go b/pkg/actions/bridge/carapace.go index cf33b76..a789809 100644 --- a/pkg/actions/bridge/carapace.go +++ b/pkg/actions/bridge/carapace.go @@ -3,7 +3,6 @@ package bridge import ( "os" "path/filepath" - "strings" "github.com/rsteube/carapace" "github.com/spf13/cobra" @@ -34,7 +33,7 @@ func ActionCarapaceBin(command ...string) carapace.Action { return actionCommand(command...)(func(command ...string) carapace.Action { return carapace.ActionCallback(func(c carapace.Context) carapace.Action { cmd := "carapace" - if executable, err := os.Executable(); err == nil && strings.HasPrefix(executable, os.TempDir()) && filepath.Base(executable) == "carapace" { + if executable, err := os.Executable(); err == nil && filepath.Base(executable) == "carapace" { cmd = executable // workaround for sandbox tests: directly call executable which was built with "go run" }