1
0
mirror of https://github.com/go-task/task.git synced 2025-06-25 00:47:04 +02:00

execext package: support context command

This commit is contained in:
Andrey Nering
2017-04-12 20:32:56 -03:00
parent 947b3de0c4
commit 822f7f83ee
5 changed files with 16 additions and 11 deletions

View File

@ -2,6 +2,7 @@ package task
import (
"bytes"
"context"
"encoding/json"
"errors"
"io/ioutil"
@ -32,7 +33,7 @@ func handleDynamicVariableContent(value string) (string, error) {
if result, ok := varCmds[value]; ok {
return result, nil
}
cmd := execext.NewCommand(value[1:])
cmd := execext.NewCommand(context.Background(), value[1:])
cmd.Stdin = os.Stdin
cmd.Stderr = os.Stderr
b, err := cmd.Output()