diff options
author | Bjørn Erik Pedersen <[email protected]> | 2020-12-18 18:20:12 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2020-12-19 17:03:07 +0100 |
commit | 10ae7c3210cd1add14d3750aa9512a87df0e1146 (patch) | |
tree | 6fa7eb1e9bfe093f3b611bbb286aefe591e1dc7a /markup/asciidocext | |
parent | ae2d1bd52df0099190ef9195666d0788708b0385 (diff) | |
download | hugo-10ae7c3210cd1add14d3750aa9512a87df0e1146.tar.gz hugo-10ae7c3210cd1add14d3750aa9512a87df0e1146.zip |
Improve LookPath
Diffstat (limited to 'markup/asciidocext')
-rw-r--r-- | markup/asciidocext/convert.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/markup/asciidocext/convert.go b/markup/asciidocext/convert.go index e2e5b7865..a5465fe9f 100644 --- a/markup/asciidocext/convert.go +++ b/markup/asciidocext/convert.go @@ -18,9 +18,10 @@ package asciidocext import ( "bytes" - "os/exec" "path/filepath" + "github.com/cli/safeexec" + "github.com/gohugoio/hugo/identity" "github.com/gohugoio/hugo/markup/asciidocext/asciidocext_config" "github.com/gohugoio/hugo/markup/converter" @@ -193,7 +194,7 @@ func (a *asciidocConverter) appendArg(args []string, option, value, defaultValue } func getAsciidoctorExecPath() string { - path, err := exec.LookPath("asciidoctor") + path, err := safeexec.LookPath("asciidoctor") if err != nil { return "" } |