diff options
Diffstat (limited to 'resources/resource_transformers/tocss/dartsass/transform.go')
-rw-r--r-- | resources/resource_transformers/tocss/dartsass/transform.go | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/resources/resource_transformers/tocss/dartsass/transform.go b/resources/resource_transformers/tocss/dartsass/transform.go index d70d2e6e0..57d9feadb 100644 --- a/resources/resource_transformers/tocss/dartsass/transform.go +++ b/resources/resource_transformers/tocss/dartsass/transform.go @@ -21,9 +21,8 @@ import ( "path/filepath" "strings" - "github.com/cli/safeexec" - "github.com/gohugoio/hugo/common/herrors" + "github.com/gohugoio/hugo/common/hexec" "github.com/gohugoio/hugo/htesting" "github.com/gohugoio/hugo/media" @@ -38,16 +37,18 @@ import ( "github.com/bep/godartsass" ) -// See https://github.com/sass/dart-sass-embedded/issues/24 -const stdinPlaceholder = "HUGOSTDIN" +const ( + // See https://github.com/sass/dart-sass-embedded/issues/24 + stdinPlaceholder = "HUGOSTDIN" + dartSassEmbeddedBinaryName = "dart-sass-embedded" +) // Supports returns whether dart-sass-embedded is found in $PATH. func Supports() bool { if htesting.SupportsAll() { return true } - p, err := safeexec.LookPath("dart-sass-embedded") - return err == nil && p != "" + return hexec.InPath(dartSassEmbeddedBinaryName) } type transform struct { |