Skip to content

Commit

Permalink
Merge pull request #1037 from carapace-sh/ble-detect
Browse files Browse the repository at this point in the history
ps: update ble detection
  • Loading branch information
rsteube committed Aug 14, 2024
2 parents 15e8644 + 59938f9 commit affaa65
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion internal/pflagfork/flagset_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func TestLookupPosixShorthandArg(t *testing.T) {

f := fs.lookupPosixShorthandArg(arg)
if f == nil || f.Name != name {
t.Fatalf("should be " + name)
t.Fatal("should be " + name)
}

if f.Prefix != prefix {
Expand Down
3 changes: 3 additions & 0 deletions pkg/ps/ps.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,13 @@ func DetermineShell() string {

func isBLE() bool {
bleEnvs := []string{
"_bleopt_connect_tty",
"_ble_util_fdlist_cloexec",
"_ble_util_fd_null",
"_ble_util_fd_stderr",
"_ble_util_fd_stdin",
"_ble_util_fd_stdout",
"_ble_util_fdvars_export",
"_ble_util_fd_zero",
}
for _, e := range bleEnvs {
Expand Down
1 change: 1 addition & 0 deletions traverse.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ loop:

switch f.Value.Type() {
case "bool":
//nolint:govet
return ActionValues("true", "false").StyleF(style.ForKeyword).Usage(f.Usage).Prefix(f.Prefix), context
default:
return storage.getFlag(cmd, f.Name).Prefix(f.Prefix), context
Expand Down

0 comments on commit affaa65

Please sign in to comment.