diff --git a/gitutils.gradle b/gitutils.gradle index e84cb1eda..ffcc8e520 100644 --- a/gitutils.gradle +++ b/gitutils.gradle @@ -1,10 +1,15 @@ ext.getBuildVersion = { -> - def stdout = new ByteArrayOutputStream() - exec { - commandLine 'git', 'rev-parse', '--short', 'HEAD' - standardOutput = stdout + // Short-term fix for #1157. Should ideally look into why method is failing. + try { + def stdout = new ByteArrayOutputStream() + exec { + commandLine 'git' , 'rev-parse' , '--short' , 'HEAD' + standardOutput = stdout + } + return stdout.toString().trim() + } catch (ignored) { + return null } - return stdout.toString().trim() } ext.getBranchName = { ->