mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-29 22:29:56 +02:00
Improve LookPath
This commit is contained in:
@@ -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 ""
|
||||
}
|
||||
|
Reference in New Issue
Block a user