From c794e6aae20196bdf7ed7ce4130301069ae278dc Mon Sep 17 00:00:00 2001 From: Rose Hogenson Date: Sat, 5 Sep 2026 18:38:34 -0700 Subject: Use absolute path for cgitrc --- roseh.moe.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'roseh.moe.go') diff --git a/roseh.moe.go b/roseh.moe.go index 23c13b4..55b3a72 100644 --- a/roseh.moe.go +++ b/roseh.moe.go @@ -1104,9 +1104,13 @@ func main() { http.Handle("code."+*domain+"/cgit.js", cgitStaticFiles) http.Handle("code."+*domain+"/robots.txt", cgitStaticFiles) http.HandleFunc("code."+*domain+"/favicon.ico", favicon) + cgitConfigAbsPath, err := filepath.Abs(*cgitConfig) + if err != nil { + log.Fatal(err) + } cgitCGI := &cgi.Handler{ Path: filepath.Join(*cgit, "cgit.cgi"), - Env: []string{"CGIT_CONFIG=" + *cgitConfig}, + Env: []string{"CGIT_CONFIG=" + cgitConfigAbsPath}, } cgitCGI.PathLocationHandler = cgitCGI http.Handle("code."+*domain+"/", cgitCGI) -- cgit v1.3.1