varabyte / kobweb

A modern framework for full stack web apps in Kotlin, built upon Compose HTML
https://kobweb.varabyte.com
Apache License 2.0
1.46k stars 65 forks source link

Apple M1 Mac: `cobweb create site` does not work because of system's Git version string #147

Closed tscholze closed 2 years ago

tscholze commented 2 years ago

The command kobweb create site does not finish or even start asking the question to setup a new project. Please see Discord discussion.

If relevant, specify:


It seems that the GIT_VERSION_REGEX pattern does not conform with the git version output on a Mac M1 which is git version 2.32.0 (Apple Git-132). If I patch it (not commit-able), the wizard works as expected.

val process = Runtime.getRuntime().git("version")
        val versionDeferred = CompletableDeferred<GitVersion>()
        process.consumeProcessOutput { line, isError ->
            val result = GIT_VERSION_REGEX.matchEntire(line)
            if (result != null) {
                versionDeferred.complete(GitVersion(
                    result.groupValues[2].toInt(),
                    result.groupValues[3].toInt(),
                    result.groupValues[4].toInt(),
                ))
            } else {
                throw KobwebException("git must be installed and present on the path") // this gets triggered
            }
        }
bitspittle commented 2 years ago

Will be fixed in 0.9.9