diff options
author | Bjørn Erik Pedersen <[email protected]> | 2020-12-18 18:20:12 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2020-12-19 17:03:07 +0100 |
commit | 10ae7c3210cd1add14d3750aa9512a87df0e1146 (patch) | |
tree | 6fa7eb1e9bfe093f3b611bbb286aefe591e1dc7a /modules | |
parent | ae2d1bd52df0099190ef9195666d0788708b0385 (diff) | |
download | hugo-10ae7c3210cd1add14d3750aa9512a87df0e1146.tar.gz hugo-10ae7c3210cd1add14d3750aa9512a87df0e1146.zip |
Improve LookPath
Diffstat (limited to 'modules')
-rw-r--r-- | modules/client.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/modules/client.go b/modules/client.go index 88c1e933e..da14d58f4 100644 --- a/modules/client.go +++ b/modules/client.go @@ -28,6 +28,8 @@ import ( "strings" "time" + "github.com/gohugoio/hugo/common/hexec" + hglob "github.com/gohugoio/hugo/hugofs/glob" "github.com/gobwas/glob" @@ -537,7 +539,10 @@ func (c *Client) runGo( } stderr := new(bytes.Buffer) - cmd := exec.CommandContext(ctx, "go", args...) + cmd, err := hexec.SafeCommandContext(ctx, "go", args...) + if err != nil { + return err + } cmd.Env = c.environ cmd.Dir = c.ccfg.WorkingDir |