use stdout fd for terminal size (#1125)
This commit is contained in:
parent
6e0f686afa
commit
4e612a2e92
1 changed files with 1 additions and 1 deletions
|
@ -398,7 +398,7 @@ func generate(cmd *cobra.Command, model, prompt string, wordWrap bool, format st
|
||||||
generateContext = []int{}
|
generateContext = []int{}
|
||||||
}
|
}
|
||||||
|
|
||||||
termWidth, _, err := term.GetSize(int(0))
|
termWidth, _, err := term.GetSize(int(os.Stdout.Fd()))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
wordWrap = false
|
wordWrap = false
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue