| commit | c5b63aa65acf77d25cc039fd90f0ee52afaa345c | [log] [tgz] |
|---|---|---|
| author | Ivan Cheremisin <[email protected]> | Tue Jul 23 14:09:45 2024 |
| committer | GitHub <[email protected]> | Tue Jul 23 14:09:45 2024 |
| tree | dd69e0ab1d00a7e362ce9d522ff81ec40dc30c77 | |
| parent | 8cde54c52f115795400a74041e54404563fdfc7a [diff] |
fix check nil
diff --git a/tty_unix.go b/tty_unix.go index 15a95dc..9446ec4 100644 --- a/tty_unix.go +++ b/tty_unix.go
@@ -65,10 +65,7 @@ } func (tty *TTY) close() error { - if tty.out == nil { - return nil - } - if tty.in == nil { + if tty.out == nil || tty.in == nil { return nil }