Skip to content

Commit

Permalink
Tweak "watching for Kobweb server" messaging based on feedback
Browse files Browse the repository at this point in the history
Now, we have a hopefully slightly less confusing experience if the timer
runs out.
  • Loading branch information
bitspittle committed Oct 22, 2024
1 parent b946037 commit 6b58165
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions kobweb/src/main/kotlin/com/varabyte/kobweb/cli/run/Run.kt
Original file line number Diff line number Diff line change
Expand Up @@ -286,17 +286,18 @@ private fun handleRun(

section {
textLine()
textLine("Depending on timing, a server might still start up despite a cancellation request.")
textLine("We'll wait for ${timeToWaitMs / 1000.0}s to see if a server starts up.")
textLine()
if (!runningServerDetected && remainingTimeMs > 0) {
textLine("Watching for a Kobweb server. (Remaining time: ${remainingTimeMs.msToSecTimeString()})")
if (!runningServerDetected) {
textLine("Depending on timing, a server might still start up despite a cancellation request.")
textLine()
textLine("Press any key to abort this check.")
} else {
if (runningServerDetected) {
textInfo("Server started up after cancellation request. Shutting it down.")
if (remainingTimeMs > 0) {
textLine("Watching for a Kobweb server. (Remaining: ${remainingTimeMs.msToSecTimeString()})")
textLine()
textLine("Press any key to abort this check.")
} else {
textLine("Server successfully cancelled. Quitting normally")
}
} else {
textInfo("Running server detected after cancellation request. Shutting it down.")
}
textLine()
}.runUntilSignal {
Expand Down

0 comments on commit 6b58165

Please sign in to comment.