From 651033c5a7781b87d53c565dedfa35059cd10960 Mon Sep 17 00:00:00 2001 From: Pete Davison Date: Wed, 8 May 2024 16:44:05 +0100 Subject: [PATCH] feat: stdin required -t - (#1623) --- taskfile/node.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/taskfile/node.go b/taskfile/node.go index be20d13f..50a5e423 100644 --- a/taskfile/node.go +++ b/taskfile/node.go @@ -30,9 +30,8 @@ func NewRootNode( timeout time.Duration, ) (Node, error) { dir = getDefaultDir(entrypoint, dir) - // Check if there is something to read on STDIN - stat, _ := os.Stdin.Stat() - if (stat.Mode()&os.ModeCharDevice) == 0 && stat.Size() > 0 { + // If the entrypoint is "-", we read from stdin + if entrypoint == "-" { return NewStdinNode(dir) } return NewNode(l, entrypoint, dir, insecure, timeout)