1
0
mirror of https://github.com/go-task/task.git synced 2025-01-12 04:34:11 +02:00

Upgrade mvdan/sh

This commit is contained in:
Andrey Nering 2018-12-15 15:43:40 -02:00
parent 7dba742e4c
commit df032b09a7
3 changed files with 5 additions and 8 deletions

2
go.mod
View File

@ -20,5 +20,5 @@ require (
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f
golang.org/x/sys v0.0.0-20180831094639-fa5fdf94c789 // indirect
gopkg.in/yaml.v2 v2.2.1
mvdan.cc/sh v0.0.0-20180829163519-3a244a89e2e5
mvdan.cc/sh v2.6.2+incompatible
)

4
go.sum
View File

@ -41,5 +41,5 @@ gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v2 v2.2.1 h1:mUhvW9EsL+naU5Q3cakzfE91YhliOondGd6ZrsDBHQE=
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
mvdan.cc/sh v0.0.0-20180829163519-3a244a89e2e5 h1:FKi9XtQO5aNipfQ/qnnLCoM6gdFwPQY702RRbNRxjK8=
mvdan.cc/sh v0.0.0-20180829163519-3a244a89e2e5/go.mod h1:IeeQbZq+x2SUGBensq/jge5lLQbS3XT2ktyp3wrt4x8=
mvdan.cc/sh v2.6.2+incompatible h1:WotkNlbcMnp2Lxz0M+j5bcSgLuvPQ8peEC394fx0vIg=
mvdan.cc/sh v2.6.2+incompatible/go.mod h1:IeeQbZq+x2SUGBensq/jge5lLQbS3XT2ktyp3wrt4x8=

View File

@ -7,6 +7,7 @@ import (
"os"
"strings"
"mvdan.cc/sh/expand"
"mvdan.cc/sh/interp"
"mvdan.cc/sh/syntax"
)
@ -41,14 +42,10 @@ func RunCommand(ctx context.Context, opts *RunCommandOptions) error {
if len(environ) == 0 {
environ = os.Environ()
}
env, err := interp.EnvFromList(environ)
if err != nil {
return err
}
r, err := interp.New(
interp.Dir(opts.Dir),
interp.Env(env),
interp.Env(expand.ListEnviron(environ...)),
interp.Module(interp.DefaultExec),
interp.Module(interp.OpenDevImpls(interp.DefaultOpen)),