From: James Mills Date: Sun, 14 Aug 2022 00:52:15 +0000 (+1000) Subject: Fix default PATH for .zs for partials for Go 1.19 changes to LookPath handling X-Git-Tag: 0.0.2^0 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=70fb47d6ee50eb81bb4d33ec2ebeea9dd94480d6;p=aya.git Fix default PATH for .zs for partials for Go 1.19 changes to LookPath handling --- diff --git a/main.go b/main.go index f5240d6..5335dcc 100644 --- a/main.go +++ b/main.go @@ -168,7 +168,7 @@ func render(s string, vars Vars) (string, error) { } } } - + } // Renders markdown with the given layout into html expanding all the macros @@ -298,7 +298,8 @@ func buildAll(watch bool) { func init() { // prepend .zs to $PATH, so plugins will be found before OS commands p := os.Getenv("PATH") - p = ZSDIR + ":" + p + w, _ := os.Getwd() + p = filepath.Join(w, ZSDIR) + ":" + p os.Setenv("PATH", p) }