diff options
Diffstat (limited to 'src/blogc-git-receiver')
-rw-r--r-- | src/blogc-git-receiver/pre-receive.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/blogc-git-receiver/pre-receive.c b/src/blogc-git-receiver/pre-receive.c index 6fd396f..5c0b3b7 100644 --- a/src/blogc-git-receiver/pre-receive.c +++ b/src/blogc-git-receiver/pre-receive.c @@ -12,6 +12,7 @@ #include <unistd.h> #include <errno.h> #include <sys/stat.h> +#include <sys/wait.h> #include <dirent.h> #include <time.h> #include "../common/utils.h" @@ -152,10 +153,10 @@ bgr_pre_receive_hook(int argc, char *argv[]) const char *make_impl = NULL; - if (127 != system("gmake -f /dev/null &> /dev/null")) { + if (127 != WEXITSTATUS(system("gmake -f /dev/null &> /dev/null"))) { make_impl = "gmake"; } - else if (127 != system("make -f /dev/null &> /dev/null")) { + else if (127 != WEXITSTATUS(system("make -f /dev/null &> /dev/null"))) { make_impl = "make"; } |