fix: respect GH_FORCE_TTY when running gh pr view

`GH_FORCE_TTY` only affects stdout, not stderr, so this check was
failing and the flag was being ignored.

I also checked for similar problem in other files but everything else
seemed stderr or stdin related.

closes #5354
This commit is contained in:
Callum Macrae 2022-03-25 15:07:47 +00:00
parent 3a949203c4
commit f7ef503051

View file

@ -98,7 +98,7 @@ func viewRun(opts *ViewOptions) error {
return err
}
connectedToTerminal := opts.IO.IsStdoutTTY() && opts.IO.IsStderrTTY()
connectedToTerminal := opts.IO.IsStdoutTTY()
if opts.BrowserMode {
openURL := pr.URL