Skip to content

Commit 651033c

Browse files
authored
feat: stdin required -t - (#1623)
1 parent 17f6e81 commit 651033c

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

taskfile/node.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,8 @@ func NewRootNode(
3030
timeout time.Duration,
3131
) (Node, error) {
3232
dir = getDefaultDir(entrypoint, dir)
33-
// Check if there is something to read on STDIN
34-
stat, _ := os.Stdin.Stat()
35-
if (stat.Mode()&os.ModeCharDevice) == 0 && stat.Size() > 0 {
33+
// If the entrypoint is "-", we read from stdin
34+
if entrypoint == "-" {
3635
return NewStdinNode(dir)
3736
}
3837
return NewNode(l, entrypoint, dir, insecure, timeout)

0 commit comments

Comments
 (0)