Improve LookPath

This commit is contained in:
Bjørn Erik Pedersen
2020-12-18 18:20:12 +01:00
parent ae2d1bd52d
commit 10ae7c3210
18 changed files with 129 additions and 42 deletions

View File

@@ -15,8 +15,7 @@
package pandoc
import (
"os/exec"
"github.com/cli/safeexec"
"github.com/gohugoio/hugo/identity"
"github.com/gohugoio/hugo/markup/internal"
@@ -65,7 +64,7 @@ func (c *pandocConverter) getPandocContent(src []byte, ctx converter.DocumentCon
}
func getPandocExecPath() string {
path, err := exec.LookPath("pandoc")
path, err := safeexec.LookPath("pandoc")
if err != nil {
return ""
}