Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'markup/rst/convert.go')
-rw-r--r--markup/rst/convert.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/markup/rst/convert.go b/markup/rst/convert.go
index c397bf5fe..faed56276 100644
--- a/markup/rst/convert.go
+++ b/markup/rst/convert.go
@@ -16,9 +16,10 @@ package rst
import (
"bytes"
- "os/exec"
"runtime"
+ "github.com/cli/safeexec"
+
"github.com/gohugoio/hugo/identity"
"github.com/gohugoio/hugo/markup/internal"
@@ -96,9 +97,9 @@ func (c *rstConverter) getRstContent(src []byte, ctx converter.DocumentContext)
}
func getRstExecPath() string {
- path, err := exec.LookPath("rst2html")
+ path, err := safeexec.LookPath("rst2html")
if err != nil {
- path, err = exec.LookPath("rst2html.py")
+ path, err = safeexec.LookPath("rst2html.py")
if err != nil {
return ""
}