aboutsummaryrefslogtreecommitdiffstats
path: root/src/blogc-git-receiver/shell.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/blogc-git-receiver/shell.c')
-rw-r--r--src/blogc-git-receiver/shell.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/blogc-git-receiver/shell.c b/src/blogc-git-receiver/shell.c
index 1ad8f20..eb859e8 100644
--- a/src/blogc-git-receiver/shell.c
+++ b/src/blogc-git-receiver/shell.c
@@ -35,7 +35,10 @@ bgr_shell(int argc, char *argv[])
}
// get home path
- 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;