Skip to content

Commit 28dd73f

Browse files
committed
always pass a non-nil logger to openSSHSession
1 parent 37f8039 commit 28dd73f

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

pkg/cmd/codespace/ssh.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ func (a *App) printOpenSSHConfig(ctx context.Context, opts configOptions, execut
219219
}
220220
}()
221221

222-
session, err := a.openSSHSession(ctx, cs, nil)
222+
session, err := a.openSSHSession(ctx, cs, noopLogger())
223223
if err != nil {
224224
result.err = fmt.Errorf("error connecting to codespace: %w", err)
225225
return
@@ -299,10 +299,6 @@ func (a *App) printOpenSSHConfig(ctx context.Context, opts configOptions, execut
299299
}
300300

301301
func (a *App) openSSHSession(ctx context.Context, codespace *api.Codespace, liveshareLogger *log.Logger) (*liveshare.Session, error) {
302-
if liveshareLogger == nil {
303-
liveshareLogger = noopLogger()
304-
}
305-
306302
session, err := codespaces.ConnectToLiveshare(ctx, a, liveshareLogger, a.apiClient, codespace)
307303
if err != nil {
308304
return nil, fmt.Errorf("error connecting to codespace: %w", err)

0 commit comments

Comments
 (0)