]> git.plutz.net Git - shellwiki/blobdiff - index.cgi
bugfix: prevent test errors from bleeding into http headers
[shellwiki] / index.cgi
index 61a8bb007c5d0807eaf9d6983d34637e74e583fc..a27a75dbdddd133b086b71b9a222434cf10a0811 100755 (executable)
--- a/index.cgi
+++ b/index.cgi
@@ -6,9 +6,9 @@
 . "${_EXEC}/tools.sh"
 . "${_EXEC}/acl.sh"
 
-REV_PAGES=${REV_PAGES:-true}
-REV_ATTACHMENTS=${REV_ATTACHMENTS:-false}
-WIKI_THEME="${WIKI_THEME:-default}"
+export REV_PAGES=${REV_PAGES:-true}
+export REV_ATTACHMENTS=${REV_ATTACHMENTS:-false}
+export WIKI_THEME="${WIKI_THEME:-default}"
 
 which git >/dev/null || REV_PAGES=false
 [ "$REV_PAGES" != true ] && REV_ATTACHMENTS=false
@@ -43,6 +43,10 @@ if [ "$REV_PAGES" = true -a ! -f "$_DATA/.gitignore" ]; then
   && printf '**/#attachments/\n' >>"$_DATA/.gitignore"
   git init "$_DATA"
   git -C "$_DATA" add .gitignore
+  printf '%s\n' "" "[user]" \
+         "email = \"shellwiki@localhost\"" \
+         "name = \"Shellwiki\"" \
+         >>"$_DATA/.git/config"
   git -C "$_DATA" commit -m 'initialization' -- .gitignore
 fi 1>&2