Skip to content

Commit

Permalink
Fix error shown by linter
Browse files Browse the repository at this point in the history
  • Loading branch information
majst01 committed Oct 11, 2023
1 parent 6bcd5f4 commit fdf588f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions internal/console/console.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Check failure on line 75 in internal/console/console.go

View workflow job for this annotation

GitHub Actions / build

fmt.Errorf call has more than one error-wrapping directive %w
} 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)

Check failure on line 77 in internal/console/console.go

View workflow job for this annotation

GitHub Actions / build

fmt.Errorf call has more than one error-wrapping directive %w
} 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)

Check failure on line 79 in internal/console/console.go

View workflow job for this annotation

GitHub Actions / build

fmt.Errorf call has more than one error-wrapping directive %w
} else {
err2 := s.Exit(0)
if err2 != nil {
Expand Down

0 comments on commit fdf588f

Please sign in to comment.