Skip to content

Commit aa94546

Browse files
committed
Fix windows bugs
Signed-off-by: Spike Curtis <spike@coder.com>
1 parent c6a3229 commit aa94546

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pty/pty_windows.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ func (p *ptyWindows) Resize(height uint16, width uint16) error {
126126
p.closeMutex.Lock()
127127
defer p.closeMutex.Unlock()
128128
if p.closed || p.console == windows.InvalidHandle {
129-
return pty.ErrClosed
129+
return ErrClosed
130130
}
131131
// Taken from: https://github.com/microsoft/hcsshim/blob/54a5ad86808d761e3e396aff3e2022840f39f9a8/internal/winapi/zsyscall_windows.go#L144
132132
ret, _, err := procResizePseudoConsole.Call(uintptr(p.console), uintptr(*((*uint32)(unsafe.Pointer(&windows.Coord{

pty/start_windows.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ func startPty(cmd *exec.Cmd, opt ...StartOption) (_ PTY, _ Process, retErr error
5454
if retErr != nil {
5555
// we hit some error finishing setup; close pty, so
5656
// we don't leak the kernel resources associated with it
57-
_ := pty.Close()
57+
_ = pty.Close()
5858
}
5959
}()
6060
winPty := pty.(*ptyWindows)

0 commit comments

Comments
 (0)