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 --- hugolib/resource_chain_test.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'hugolib/resource_chain_test.go') diff --git a/hugolib/resource_chain_test.go b/hugolib/resource_chain_test.go index 4f93115f9..b5baa4d0b 100644 --- a/hugolib/resource_chain_test.go +++ b/hugolib/resource_chain_test.go @@ -19,13 +19,15 @@ import ( "io" "math/rand" "os" - "os/exec" + "path/filepath" "runtime" "strings" "testing" "time" + "github.com/gohugoio/hugo/common/hexec" + jww "github.com/spf13/jwalterweatherman" "github.com/gohugoio/hugo/common/herrors" @@ -930,7 +932,8 @@ class-in-b { b.WithSourceFile("postcss.config.js", postcssConfig) b.Assert(os.Chdir(workDir), qt.IsNil) - _, err = exec.Command("npm", "install").CombinedOutput() + cmd, err := hexec.SafeCommand("npm", "install") + _, err = cmd.CombinedOutput() b.Assert(err, qt.IsNil) b.Build(BuildCfg{}) -- cgit v1.2.3