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

@@ -1,6 +1,7 @@
package execext
import (
"context"
"os/exec"
)
@@ -17,6 +18,6 @@ func init() {
ShExists = err == nil
}
func newShCommand(c string) *exec.Cmd {
return exec.Command(ShPath, "-c", c)
func newShCommand(ctx context.Context, c string) *exec.Cmd {
return exec.CommandContext(ctx, ShPath, "-c", c)
}