From: Heiko Schlittermann (HS12-RIPE) Date: Wed, 2 Nov 2016 22:43:28 +0000 (+0100) Subject: Check, if git is available, before trying to update the client X-Git-Url: https://git.exim.org/buildfarm-client.git/commitdiff_plain/96445fd354298e32feffae810de2136050915c62 Check, if git is available, before trying to update the client --- diff --git a/run_cron b/run_cron index caadf4b..278084e 100755 --- a/run_cron +++ b/run_cron @@ -11,7 +11,8 @@ chdir $Bin or die "$0: Can't chdir '$Bin': $!\n"; # client installation. FIXME: What to do, if we have # a 'detached' .git? if (-d '.git') { - my ($git) = grep { -x } map { "$_/git" } split /:/, $ENV{PATH}; + die "$0: found .git dir, but git is not available\n" + if not grep { -x } map { "$_/git" } split /:/, $ENV{PATH}; system('git pull >/dev/null') == 0 or die $? >> 8; }