diff --git a/main.go b/main.go index 69892d76..bde2d66a 100644 --- a/main.go +++ b/main.go @@ -154,15 +154,15 @@ func main() { // readFromStdin reads data piped into stdin func readFromStdin(opts *opts.CLIOptions) { + if opts.Global.XAction != "write" { + return + } + info, err := os.Stdin.Stat() if err != nil { logrus.Fatal(err) } - if opts.Global.XAction != "write" { - return - } - if info.Mode()&os.ModeCharDevice != 0 { return }