Skip to content

Commit

Permalink
Merge branch 'main' of github.com:matryer/xbar into main
Browse files Browse the repository at this point in the history
  • Loading branch information
matryer committed Apr 2, 2021
2 parents 9d38354 + 6154485 commit 331aaae
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 7 deletions.
3 changes: 1 addition & 2 deletions pkg/plugins/action.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func (i *Item) Action() ActionFunc {
if i.Params.Shell != "" {
actions = append(actions, actionShell(debugf, i, i.Params.Shell, i.Params.ShellParams))
}
if i.Params.Refresh == true {
if i.Params.Refresh {
shouldDelayBeforeRefresh := false
if len(actions) > 0 {
// there are actions other than refresh, so let's introduce a
Expand Down Expand Up @@ -157,6 +157,5 @@ func actionRefresh(debugf DebugFunc, refreshFunc func(ctx context.Context)) Acti
return func(ctx context.Context) {
debugf("action refresh")
refreshFunc(ctx)
return
}
}
7 changes: 3 additions & 4 deletions pkg/plugins/install_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,6 @@ func TestGetInstalledPluginName(t *testing.T) {
// is.True(err != nil)
// })
// }

const simplePlugin = `#!/bin/bash
echo "Hello, xbar."
`
// const simplePlugin = `#!/bin/bash
// echo "Hello, xbar."
// `
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion pkg/plugins/parse_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func TestParseParams(t *testing.T) {
s, params, err = parseParams(`no params`)
is.NoErr(err)
is.Equal(s, "no params")
is.Equal(params.Terminal, false) // Terminal
is.Equal(params.Terminal, "false") // Terminal
is.Equal(params.Refresh, false) // Refresh
is.Equal(params.Dropdown, true) // Dropdown
is.Equal(params.Length, 0) // Length
Expand Down

0 comments on commit 331aaae

Please sign in to comment.