From 439e5279c5d334f849a6ab7b51bad1bb12f13aae Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Thu, 26 Jan 2012 17:27:03 +0100 Subject: [PATCH] solenv: handle error code from ./g This avoids "Cannot find the git binary! Is git installed and is in PATH?" strings in the about dialog when building from a tarball. --- solenv/bin/modules/installer/scriptitems.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/solenv/bin/modules/installer/scriptitems.pm b/solenv/bin/modules/installer/scriptitems.pm index a8963a4f8126..905b37e844db 100644 --- a/solenv/bin/modules/installer/scriptitems.pm +++ b/solenv/bin/modules/installer/scriptitems.pm @@ -815,8 +815,8 @@ sub replace_setup_variables if ( $localbuild =~ /^\s*(\w+?)(\d+)\s*$/ ) { $localbuild = $2; } # using "680" instead of "src680" - my $buildidstring = `$ENV{'SRC_ROOT'}/g -s log -n 1 --pretty=format:%h- ; git describe --abbrev=0`; - if (!$buildidstring) { + my $buildidstring = `$ENV{'SRC_ROOT'}/g -s log -n 1 --pretty=format:%h- && git describe --abbrev=0`; + if ($? || !$buildidstring) { $buildidstring = $localbuild . $localminor . "(Build:" . $installer::globals::buildid . ")"; } else {