diff options
author | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2016-10-11 02:56:19 +0200 |
---|---|---|
committer | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2016-10-11 02:56:19 +0200 |
commit | e561e1b9872626189df7911fa8467296d9a22eed (patch) | |
tree | bfd8197a33729a343d5c446036aa7cab6c34f840 /src/blogc-git-receiver/pre-receive.c | |
parent | 8e6c611dfb402ce735dfea865f8920a723562a3d (diff) | |
download | blogc-e561e1b9872626189df7911fa8467296d9a22eed.tar.gz blogc-e561e1b9872626189df7911fa8467296d9a22eed.tar.bz2 blogc-e561e1b9872626189df7911fa8467296d9a22eed.zip |
git-receiver: fix previous patch
Diffstat (limited to 'src/blogc-git-receiver/pre-receive.c')
-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"; } |