mirror of
https://github.com/go-task/task.git
synced 2025-11-23 22:24:45 +02:00
allow custom Stdin, Stdout and Stderr while running as a lib
This commit is contained in:
@@ -3,6 +3,7 @@ package main
|
||||
import (
|
||||
"fmt"
|
||||
"log"
|
||||
"os"
|
||||
|
||||
"github.com/go-task/task"
|
||||
|
||||
@@ -61,6 +62,10 @@ hello:
|
||||
e := task.Executor{
|
||||
Force: force,
|
||||
Watch: watch,
|
||||
|
||||
Stdin: os.Stdin,
|
||||
Stdout: os.Stdout,
|
||||
Stderr: os.Stderr,
|
||||
}
|
||||
if err := e.ReadTaskfile(); err != nil {
|
||||
log.Fatal(err)
|
||||
|
||||
Reference in New Issue
Block a user