aboutsummaryrefslogtreecommitdiffstats
path: root/src/blogc-git-receiver/post-receive.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/blogc-git-receiver/post-receive.c')
-rw-r--r--src/blogc-git-receiver/post-receive.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/blogc-git-receiver/post-receive.c b/src/blogc-git-receiver/post-receive.c
index 3b0f48c..3c7cb00 100644
--- a/src/blogc-git-receiver/post-receive.c
+++ b/src/blogc-git-receiver/post-receive.c
@@ -6,6 +6,8 @@
* See the file LICENSE.
*/
+#include <errno.h>
+#include <string.h>
#include <stdio.h>
#include <libgen.h>
#include <unistd.h>
@@ -25,7 +27,8 @@ bgr_post_receive_hook(int argc, char *argv[])
char *hooks_dir = dirname(argv[0]); // this was validated by main()
char *real_hooks_dir = realpath(hooks_dir, NULL);
if (real_hooks_dir == NULL) {
- fprintf(stderr, "error: failed to guess repository root.\n");
+ fprintf(stderr, "error: failed to guess repository root: %s\n",
+ strerror(errno));
return 3;
}