[client] Fix errcheck findings from the latest golangci-lint (#8251)

This commit is contained in:
Viktor Liu
2026-10-19 22:16:59 +09:00
committed by GitHub
parent f8f335720d
commit b1f4efb160
3 changed files with 25 additions and 11 deletions
+4 -2
View File
@@ -166,7 +166,8 @@ func (c *Client) ExecuteCommandWithIO(ctx context.Context, command string) error
case <-ctx.Done():
_ = session.Signal(ssh.SIGTERM)
select {
case <-done:
case err := <-done:
log.Debugf("session ended after SIGTERM: %v", err)
return ctx.Err()
case <-time.After(100 * time.Millisecond):
return ctx.Err()
@@ -205,7 +206,8 @@ func (c *Client) ExecuteCommandWithPTY(ctx context.Context, command string) erro
case <-ctx.Done():
_ = session.Signal(ssh.SIGTERM)
select {
case <-done:
case err := <-done:
log.Debugf("session ended after SIGTERM: %v", err)
return ctx.Err()
case <-time.After(100 * time.Millisecond):
return ctx.Err()