diff options
Diffstat (limited to 'modules/client.go')
-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 |