From fdf588f31887aad8711d3eaf723c6a628e74e8b1 Mon Sep 17 00:00:00 2001 From: Stefan Majer Date: Wed, 11 Oct 2023 08:52:58 +0200 Subject: [PATCH] Fix error shown by linter --- internal/console/console.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/internal/console/console.go b/internal/console/console.go index 281a8a0..9f76c91 100644 --- a/internal/console/console.go +++ b/internal/console/console.go @@ -71,11 +71,12 @@ func Open(s ssh.Session, cmd *exec.Cmd) error { <-done if winSizeErr != nil { - err = fmt.Errorf("exit ssh session:%s error:%w", s.Exit(1), winSizeErr) //nolint:errorlint + // FIXME why calling s.Exit(1) in the error message ? + err = fmt.Errorf("exit ssh session:%w error:%w", s.Exit(1), winSizeErr) } else if stdinErr != nil { - err = fmt.Errorf("exit ssh session:%s error:%w", s.Exit(1), stdinErr) //nolint:errorlint + err = fmt.Errorf("exit ssh session:%w error:%w", s.Exit(1), stdinErr) } else if stdoutErr != nil { - err = fmt.Errorf("exit ssh session:%s error:%w", s.Exit(1), stdoutErr) //nolint:errorlint + err = fmt.Errorf("exit ssh session:%w error:%w", s.Exit(1), stdoutErr) } else { err2 := s.Exit(0) if err2 != nil {