From 10ae7c3210cd1add14d3750aa9512a87df0e1146 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Fri, 18 Dec 2020 18:20:12 +0100 Subject: Improve LookPath --- modules/client.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'modules/client.go') 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 -- cgit v1.2.3