diff options
| author | Rose Hogenson <rosehogenson@posteo.net> | 2026-09-05 18:38:34 -0700 |
|---|---|---|
| committer | Rose Hogenson <rosehogenson@posteo.net> | 2026-09-06 00:52:18 -0700 |
| commit | c794e6aae20196bdf7ed7ce4130301069ae278dc (patch) | |
| tree | d830466b20fb4bad44bf7ec8581033f99e2f65f7 | |
| parent | Add cgitrc to .gitignore (diff) | |
| download | roseh.moe-c794e6aae20196bdf7ed7ce4130301069ae278dc.tar.zst | |
Use absolute path for cgitrc
| -rw-r--r-- | roseh.moe.go | 6 |
1 files changed, 5 insertions, 1 deletions
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) |
