Skip to content

Commit

Permalink
carapace: remove tmpdir check
Browse files Browse the repository at this point in the history
  • Loading branch information
rsteube committed Dec 22, 2023
1 parent ecda645 commit 1f1c87d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pkg/actions/bridge/carapace.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package bridge
import (
"os"
"path/filepath"
"strings"

"github.com/rsteube/carapace"
"github.com/spf13/cobra"
Expand Down Expand Up @@ -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"
}

Expand Down

0 comments on commit 1f1c87d

Please sign in to comment.