]> Nishi Git Mirror - aya.git/commitdiff
Fix default PATH for .zs for partials for Go 1.19 changes to LookPath handling 0.0.2
authorJames Mills <prologic@shortcircuit.net.au>
Sun, 14 Aug 2022 00:52:15 +0000 (10:52 +1000)
committerJames Mills <prologic@shortcircuit.net.au>
Sun, 14 Aug 2022 00:52:15 +0000 (10:52 +1000)
main.go

diff --git a/main.go b/main.go
index f5240d6a27ba46b49a1ef585f299cdf8f2555351..5335dccd0410cadc1c18bc32fae3c159280c7f37 100644 (file)
--- 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)
 }