Add execute output style options

This commit is contained in:
kj
2019-02-05 15:42:57 +09:00
parent 2cb070f5b3
commit a026d72924
2 changed files with 8 additions and 0 deletions

View File

@@ -57,6 +57,7 @@ func main() {
silent bool
dry bool
dir string
output string
)
pflag.BoolVar(&versionFlag, "version", false, "show Task version")
@@ -69,6 +70,7 @@ func main() {
pflag.BoolVarP(&silent, "silent", "s", false, "disables echoing")
pflag.BoolVar(&dry, "dry", false, "compiles and prints tasks in the order that they would be run, without executing them")
pflag.StringVarP(&dir, "dir", "d", "", "sets directory of execution")
pflag.StringVarP(&output, "output", "o", "", "sets output style: [interleaved|group|prefixed]")
pflag.Parse()
if versionFlag {
@@ -105,6 +107,8 @@ func main() {
Stdin: os.Stdin,
Stdout: os.Stdout,
Stderr: os.Stderr,
OutputStyle: output,
}
if err := e.Setup(); err != nil {
log.Fatal(err)