Skip to content

Commit ce0cf0f

Browse files
author
Krystian Panek
authored
Merge pull request #1 from Cognifide/ux-improvements
UX improvements
2 parents cf7f2b7 + 5cd24fd commit ce0cf0f

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

src/main/kotlin/com/cognifide/gradle/environment/docker/Docker.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ class Docker(val environment: EnvironmentExtension) {
4747

4848
val configPath get() = runtime.determinePath(environment.sourceDir.get().asFile)
4949

50-
val rootPath get() = runtime.determinePath(environment.rootDir.get().asFile)
50+
val workPath get() = runtime.determinePath(environment.rootDir.get().asFile)
51+
52+
val rootPath get() = runtime.determinePath(environment.project.rootProject.projectDir)
5153

5254
fun init() {
5355
syncComposeFile()

src/main/kotlin/com/cognifide/gradle/environment/docker/container/DevOptions.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,8 @@ class DevOptions(val container: Container) {
1313
fun watchConfigDir(vararg paths: String) = paths.forEach {
1414
watchDir(container.host.configDir.dir(it))
1515
}
16+
17+
fun watchRootDir(vararg paths: String) = paths.forEach {
18+
watchDir(container.environment.project.rootProject.layout.projectDirectory.dir(it))
19+
}
1620
}

src/main/kotlin/com/cognifide/gradle/environment/health/HealthChecker.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class HealthChecker(val environment: EnvironmentExtension) {
5050
reset()
5151

5252
step = when {
53-
no > 1 -> "Health rechecking (attempt $no/${retry.times}, ${failed.size} ${if (failed.size == 1) "check" else "checks"} failed)"
53+
no > 1 -> "Health rechecking (attempt ${no - 1}/${retry.times}, ${failed.size} ${if (failed.size == 1) "check" else "checks"} failed)"
5454
else -> "Health checking"
5555
}
5656

@@ -74,7 +74,8 @@ class HealthChecker(val environment: EnvironmentExtension) {
7474
logger.info(message)
7575
}
7676
} catch (e: EnvironmentException) {
77-
val message = "Environment health check(s) failed. Success ratio: $count:\n${all.joinToString("\n")}"
77+
val message = "Environment health check(s) failed. Success ratio: $count:\n" +
78+
all.sortedWith(compareBy({ it.passed }, { it.check.name })).joinToString("\n")
7879
if (!verbose) {
7980
logger.error(message)
8081
} else {

0 commit comments

Comments
 (0)