osteele / gojekyll

A fast Go implementation of the Jekyll blogging engine
MIT License
332 stars 14 forks source link

New pygmentize detection breaks in go < 1.16 #40

Closed osteele closed 3 years ago

osteele commented 3 years ago

(As referenced here:) tags/highlight.go won't compile in go < 1.16, because it uses "io/fs":

build github.com/osteele/gojekyll: cannot load io/fs: malformed module path "io/fs": missing dot in first path element

Previous versions used this code to test for the absence of the pygmentize command, but it does not work in go 1.16 because the error is not on the specified type:

    if e.Err == exec.ErrNotFound {

831ea53 changed to use this code, but this code does not compile in go < 1.16:

    if pathErr, ok := err.(*fs.PathError); ok {