hugo

Unnamed repository; edit this file 'description' to name the repository.

git clone git://git.shimmy1996.com/hugo.git
commit b60e1bbdfee76e29b3b3c3d2fdd67649b44ba44c
parent 61cf3c9f6386d06c18c663195b35c4152605c398
Author: Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Date:   Tue, 15 Mar 2022 08:54:56 +0100

dartsass: Improve error message when no read access

Fixes #9662

Diffstat:
Mresources/resource_transformers/tocss/dartsass/client.go | 4++++
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git 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
 	}