diff --git a/app/build.gradle b/app/build.gradle index b8098a9fe..283a8374c 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -7,12 +7,13 @@ plugins { // For constructing gitSha only def getGitSha = { - try { + try { // Try-catch is necessary for build to work on non-git distributions providers.exec { commandLine 'git', 'rev-parse', 'HEAD' + executionResult.rethrowFailure() // Without this, sometimes it just stops immediately instead of throwing }.standardOutput.asText.get().trim() } catch (Exception e) { - "unknown" // Try-catch is necessary for build to work on non-git distributions + "unknown" } }