1
0
mirror of https://github.com/go-task/task.git synced 2025-06-23 00:38:19 +02:00

fix: resolve directory correctly when using --dir

This commit is contained in:
Pete Davison
2024-01-25 12:36:31 +00:00
parent bb9d582255
commit c7ba42b81a
5 changed files with 19 additions and 5 deletions

View File

@ -16,6 +16,7 @@ type Node interface {
Location() string
Optional() bool
Remote() bool
BaseDir() string
}
func NewRootNode(
@ -26,7 +27,7 @@ func NewRootNode(
// Check if there is something to read on STDIN
stat, _ := os.Stdin.Stat()
if (stat.Mode()&os.ModeCharDevice) == 0 && stat.Size() > 0 {
return NewStdinNode()
return NewStdinNode(dir)
}
// If no entrypoint is specified, search for a taskfile
if entrypoint == "" {