diff --git a/build.gradle.kts b/build.gradle.kts index 45be380f..fc35b703 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -37,9 +37,13 @@ subprojects { fun versionBanner(): String { val os = ByteArrayOutputStream() - project.exec { - commandLine = "git rev-parse --short=8 HEAD".split(" ") - standardOutput = os + try { + project.exec { + commandLine = "git rev-parse --short=8 HEAD".split(" ") + standardOutput = os + } + } catch (e: ExecException) { + return "Unknown" } return String(os.toByteArray()).trim() } @@ -51,7 +55,7 @@ fun builder(): String { commandLine = "git config user.name".split(" ") standardOutput = os } - } catch (e: Exception) { + } catch (e: ExecException) { return "Unknown" } return String(os.toByteArray()).trim()