restructure safeguard

This commit is contained in:
Julian Krings
2025-09-29 15:45:56 +02:00
parent 9d796bd2a0
commit 526efd3ae1
16 changed files with 484 additions and 565 deletions

View File

@@ -184,10 +184,10 @@ val generateTemplates = tasks.register<Copy>("generateTemplates") {
"commit" to provider {
val res = runCatching { project.extensions.getByType<Grgit>().head().id }
res.getOrDefault("")
.takeIf { it.length == 40 } ?: {
logger.error("Git commit hash not found", res.exceptionOrNull())
.takeIf { it.length == 40 } ?: run {
this.logger.error("Git commit hash not found", res.exceptionOrNull())
"unknown"
}()
}
},
)