Skip to content

Commit d88e872

Browse files
committed
Add terminality to panic message
To improve diagnoability of #259.
1 parent f28edc8 commit d88e872

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

moar.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ func printProblemsHeader() {
5151
fmt.Fprintln(os.Stderr, "GOARCH :", runtime.GOARCH)
5252
fmt.Fprintln(os.Stderr, "Compiler:", runtime.Compiler)
5353
fmt.Fprintln(os.Stderr, "NumCPU :", runtime.NumCPU())
54+
fmt.Fprintln(os.Stderr)
55+
fmt.Fprintln(os.Stderr, "Stdin is a terminal:", term.IsTerminal(int(os.Stdin.Fd())))
56+
fmt.Fprintln(os.Stderr, "Stdout is a terminal:", term.IsTerminal(int(os.Stdout.Fd())))
5457
}
5558

5659
func parseLexerOption(lexerOption string) (chroma.Lexer, error) {

0 commit comments

Comments
 (0)