Merge pull request #77 from Sh4d1/fix_panic_pipe
This commit is contained in:
commit
7dbfe0223c
|
@ -310,8 +310,11 @@ func (c *Client) Loop() error {
|
|||
return err
|
||||
}
|
||||
}
|
||||
term := console.Current()
|
||||
err := term.SetRaw()
|
||||
term, err := console.ConsoleFromFile(os.Stdout)
|
||||
if err != nil {
|
||||
return fmt.Errorf("os.Stdout is not a valid terminal")
|
||||
}
|
||||
err = term.SetRaw()
|
||||
if err != nil {
|
||||
return fmt.Errorf("Error setting raw terminal: %v", err)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue