aboutsummaryrefslogtreecommitdiffstats
path: root/src/blogc-git-receiver/pre-receive.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/blogc-git-receiver/pre-receive.c')
-rw-r--r--src/blogc-git-receiver/pre-receive.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/blogc-git-receiver/pre-receive.c b/src/blogc-git-receiver/pre-receive.c
index b059753..20c6738 100644
--- a/src/blogc-git-receiver/pre-receive.c
+++ b/src/blogc-git-receiver/pre-receive.c
@@ -177,7 +177,10 @@ bgr_pre_receive_hook(int argc, char *argv[])
goto cleanup;
}
- char *home = getenv("HOME");
+ char *home = getenv("BLOGC_GIT_RECEIVER_BASEDIR");
+ if (home == NULL) {
+ home = getenv("HOME");
+ }
if (home == NULL) {
fprintf(stderr, "error: failed to find user home path\n");
rv = 3;