always pass a non-nil logger to openSSHSession

This commit is contained in:
Jason Lunz 2021-12-20 11:52:39 -07:00
parent 37f8039f76
commit 28dd73ffdf
No known key found for this signature in database
GPG key ID: C3EB59E26C4EE4F3

View file

@ -219,7 +219,7 @@ func (a *App) printOpenSSHConfig(ctx context.Context, opts configOptions, execut
}
}()
session, err := a.openSSHSession(ctx, cs, nil)
session, err := a.openSSHSession(ctx, cs, noopLogger())
if err != nil {
result.err = fmt.Errorf("error connecting to codespace: %w", err)
return
@ -299,10 +299,6 @@ func (a *App) printOpenSSHConfig(ctx context.Context, opts configOptions, execut
}
func (a *App) openSSHSession(ctx context.Context, codespace *api.Codespace, liveshareLogger *log.Logger) (*liveshare.Session, error) {
if liveshareLogger == nil {
liveshareLogger = noopLogger()
}
session, err := codespaces.ConnectToLiveshare(ctx, a, liveshareLogger, a.apiClient, codespace)
if err != nil {
return nil, fmt.Errorf("error connecting to codespace: %w", err)