mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-29 22:29:56 +02:00
Pull in latest Go template source
This commit is contained in:
@@ -13,6 +13,7 @@ package testenv
|
||||
import (
|
||||
"errors"
|
||||
"flag"
|
||||
"github.com/gohugoio/hugo/tpl/internal/go_templates/cfg"
|
||||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
@@ -21,9 +22,6 @@ import (
|
||||
"strings"
|
||||
"sync"
|
||||
"testing"
|
||||
|
||||
"github.com/cli/safeexec"
|
||||
"github.com/gohugoio/hugo/tpl/internal/go_templates/cfg"
|
||||
)
|
||||
|
||||
// Builder reports the name of the builder running this test
|
||||
@@ -109,7 +107,7 @@ func GoTool() (string, error) {
|
||||
if _, err := os.Stat(path); err == nil {
|
||||
return path, nil
|
||||
}
|
||||
goBin, err := safeexec.LookPath("go" + exeSuffix)
|
||||
goBin, err := exec.LookPath("go" + exeSuffix)
|
||||
if err != nil {
|
||||
return "", errors.New("cannot find go tool: " + err.Error())
|
||||
}
|
||||
@@ -154,7 +152,7 @@ func MustHaveExecPath(t testing.TB, path string) {
|
||||
|
||||
err, found := execPaths.Load(path)
|
||||
if !found {
|
||||
_, err = safeexec.LookPath(path)
|
||||
_, err = exec.LookPath(path)
|
||||
err, _ = execPaths.LoadOrStore(path, err)
|
||||
}
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user