2
2
mirror of https://github.com/Hilbis/Hilbish synced 2025-04-21 04:53:24 +00:00

fix: use term package to check if is a terminal

This commit is contained in:
sammyette 2024-04-06 18:27:22 -04:00
parent 11323a70aa
commit 20761e754c
Signed by: sammyette
GPG Key ID: 904FC49417B44DCD

View File

@ -88,7 +88,7 @@ func main() {
interactive = true interactive = true
} }
if fileInfo, _ := os.Stdin.Stat(); (fileInfo.Mode() & os.ModeCharDevice) == 0 { if fileInfo, _ := os.Stdin.Stat(); (fileInfo.Mode() & os.ModeCharDevice) == 0 || !term.IsTerminal(int(os.Stdin.Fd())) {
interactive = false interactive = false
} }