mirror of
https://github.com/jesseduffield/lazydocker.git
synced 2026-07-22 07:11:01 +00:00
defer closing right after checking error
This commit is contained in:
parent
97ddc6820b
commit
9bf57b0063
1 changed files with 1 additions and 1 deletions
|
|
@ -370,6 +370,7 @@ func (c *Container) Attach() error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer hijack.Close()
|
||||
|
||||
fd := os.Stdin.Fd()
|
||||
oldState, err := term.MakeRaw(fd)
|
||||
|
|
@ -416,7 +417,6 @@ func (c *Container) Attach() error {
|
|||
return err
|
||||
}
|
||||
|
||||
hijack.Close()
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue