mirror of
https://github.com/fiatjaf/nak.git
synced 2025-12-12 02:08:49 +00:00
use isatty for detecting stuff for the fancy output (it doesn't work).
This commit is contained in:
@@ -24,6 +24,7 @@ import (
|
||||
"github.com/chzyer/readline"
|
||||
"github.com/fatih/color"
|
||||
jsoniter "github.com/json-iterator/go"
|
||||
"github.com/mattn/go-isatty"
|
||||
"github.com/mattn/go-tty"
|
||||
"github.com/urfave/cli/v3"
|
||||
"golang.org/x/term"
|
||||
@@ -315,6 +316,10 @@ func supportsDynamicMultilineMagic() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
if !isatty.IsTerminal(os.Stdout.Fd()) {
|
||||
return false
|
||||
}
|
||||
|
||||
width, _, err := term.GetSize(int(os.Stderr.Fd()))
|
||||
if err != nil {
|
||||
return false
|
||||
|
||||
Reference in New Issue
Block a user