os: make Stdin.Stat() return ModeCharDevice if Stdin is console
CL 20845 changed Stdin.Stat() so it returns ModeNamedPipe. But introduced TestStatStdin does not test what Stdin.Stat() returns when Stdin is console. This CL adjusts both TestStatStdin and Stdin.Stat implementations to handle console. Return ModeCharDevice from Stdin.Stat() when Stdin is console on windows, just like it does on unix. Fixes #14853. Change-Id: I54d73caee2aea45a99618d11600d8e82fe20d0c0 Reviewed-on: https://go-review.googlesource.com/34090Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Showing
Please
register
or
sign in
to comment