X-Git-Url: https://git.exim.org/buildfarm-client.git/blobdiff_plain/ea0a7aa537a6f344e1e694f13c0921c78438f566..e3d90d2e80ec62686172ac7fc43f10b1a6321fb1:/EximBuild/SCM.pm diff --git a/EximBuild/SCM.pm b/EximBuild/SCM.pm index df8862e..9b006cd 100644 --- a/EximBuild/SCM.pm +++ b/EximBuild/SCM.pm @@ -1,6 +1,7 @@ use strict; use File::Find; +use Cwd; =comment @@ -8,7 +9,7 @@ Copyright (c) 2003-2010, Andrew Dunstan See accompanying License file for license details -=cut +=cut ########################################################################## # @@ -202,14 +203,23 @@ sub checkout if (-d $target) { + # First check and see if git is in path + `which git 2>&1`; + if ($? != 0) + { + my @ret = `env`; + unshift @ret, "git not found in path\n"; + main::send_result("$target-Git",$status,\@ret); + } + chdir $target; my @branches = `git branch 2>&1`; - unless (grep {/^\* bf_$branch$/} @branches) + unless (grep {/^\* bf_\Q$branch\E$/} @branches) { chdir '..'; print "Missing checked out branch bf_$branch:\n",@branches if ($main::verbose); - unshift @branches,"Missing checked out branch bf_$branch:\n"; + unshift @branches,"Missing checked out branch bf_$branch in " . cwd() . ":\n"; main::send_result("$target-Git",$status,\@branches); } my @pulllog = `git pull 2>&1`;