File tree Expand file tree Collapse file tree 2 files changed +3
-11
lines changed Expand file tree Collapse file tree 2 files changed +3
-11
lines changed Original file line number Diff line number Diff line change @@ -381,16 +381,6 @@ func (inv *Invocation) run(state *runState) error {
381
381
return nil
382
382
}
383
383
384
- // CloseStdin closes the invocation's Stdin if it is an io.Closer.
385
- func (inv * Invocation ) CloseStdin () error {
386
- // If we don't close Stdin, the io.Copy below may
387
- // block indefinitely on Stdin Read.
388
- if rc , ok := inv .Stdin .(io.Closer ); ok {
389
- return rc .Close ()
390
- }
391
- return nil
392
- }
393
-
394
384
type RunCommandError struct {
395
385
Cmd * Cmd
396
386
Err error
Original file line number Diff line number Diff line change @@ -219,7 +219,9 @@ func (r *RootCmd) ssh() *clibase.Cmd {
219
219
rawSSH .Close ()
220
220
// If we don't close Stdin, the io.Copy below may
221
221
// block indefinitely on Stdin Read.
222
- _ = inv .CloseStdin ()
222
+ if rc , ok := inv .Stdin .(io.Closer ); ok {
223
+ rc .Close ()
224
+ }
223
225
return nil
224
226
}, logger , client , workspace )
225
227
}()
You can’t perform that action at this time.
0 commit comments