diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2022-03-15 08:54:56 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2022-03-15 16:34:54 +0100 |
commit | b60e1bbdfee76e29b3b3c3d2fdd67649b44ba44c (patch) | |
tree | 61269ac299515123fce000783de381608a8a7192 /resources/resource_transformers | |
parent | 61cf3c9f6386d06c18c663195b35c4152605c398 (diff) |
dartsass: Improve error message when no read access
Fixes #9662
Diffstat (limited to 'resources/resource_transformers')
-rw-r--r-- | resources/resource_transformers/tocss/dartsass/client.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/resources/resource_transformers/tocss/dartsass/client.go b/resources/resource_transformers/tocss/dartsass/client.go index c2a572d9b..b5d05b30b 100644 --- a/resources/resource_transformers/tocss/dartsass/client.go +++ b/resources/resource_transformers/tocss/dartsass/client.go @@ -16,6 +16,7 @@ package dartsass import ( + "fmt" "io" "github.com/gohugoio/hugo/helpers" @@ -77,6 +78,9 @@ func (c *Client) toCSS(args godartsass.Args, src io.Reader) (godartsass.Result, res, err := c.transpiler.Execute(args) if err != nil { + if err.Error() == "unexpected EOF" { + return res, fmt.Errorf("got unexpected EOF when executing %q. The user running hugo must have read and execute permissions on this program. With execute permissions only, this error is thrown.", dartSassEmbeddedBinaryName) + } return res, err } |