Skip to content

Commit 364c8bf

Browse files
committed
fix lint error; move os.Executable call outside of the anonymous
goroutine Signed-off-by: Callum Styan <callumstyan@gmail.com>
1 parent d3d5e1e commit 364c8bf

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

cli/logout_test.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,11 @@ func TestLogout(t *testing.T) {
9090
logout.Stdin = pty.Input()
9191
logout.Stdout = pty.Output()
9292

93-
go func() {
94-
executable, err := os.Executable()
95-
require.NoError(t, err)
96-
require.NotEqual(t, "", executable)
93+
executable, err := os.Executable()
94+
require.NoError(t, err)
95+
require.NotEqual(t, "", executable)
9796

97+
go func() {
9898
defer close(logoutChan)
9999
err = logout.Run()
100100
require.Contains(t, err.Error(), fmt.Sprintf("Try logging in using '%s login <url>'.", executable))

0 commit comments

Comments
 (0)