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:
@ -10,12 +10,14 @@ import (
|
||||
// A StdinNode is a node that reads a taskfile from the standard input stream.
|
||||
type StdinNode struct {
|
||||
*BaseNode
|
||||
Dir string
|
||||
}
|
||||
|
||||
func NewStdinNode() (*StdinNode, error) {
|
||||
func NewStdinNode(dir string) (*StdinNode, error) {
|
||||
base := NewBaseNode()
|
||||
return &StdinNode{
|
||||
BaseNode: base,
|
||||
Dir: dir,
|
||||
}, nil
|
||||
}
|
||||
|
||||
@ -38,3 +40,7 @@ func (node *StdinNode) Read(ctx context.Context) ([]byte, error) {
|
||||
}
|
||||
return stdin, nil
|
||||
}
|
||||
|
||||
func (node *StdinNode) BaseDir() string {
|
||||
return node.Dir
|
||||
}
|
||||
|
Reference in New Issue
Block a user