Merge nucleic/mellow-dewy-falcon-rjhr into main
build / build (push) Canceled after 0s

This commit is contained in:
2026-08-07 04:14:34 -07:00
parent 042bd813a8
commit af0369d443
5 changed files with 450 additions and 32 deletions
+12 -2
View File
@@ -309,13 +309,23 @@ struct ImageCommand: AsyncParsableCommand {
case .installing: return "install"
case .firstBoot: return "firstBoot"
// Each provisioning step is its own headline — "installing Node.js"
// should not erase "downloading gitea-runner".
case .provisioning(let step): return "provisioning:\(step)"
// should not erase "downloading gitea-runner" — but a step that carries
// a live percentage keeps rewriting one line rather than scrolling a
// hundred of them, so only the part before the payload identifies it.
case .provisioning(let step): return "provisioning:\(Self.stableHead(of: step))"
case .finalizing: return "finalizing"
case .done: return "done"
}
}
/// The fixed part of a status line: everything before the two-space run that
/// separates a headline from its payload, following the same convention as
/// `installing macOS [====]`. A step with no payload is its own head.
static func stableHead(of step: String) -> String {
guard let separator = step.range(of: " ") else { return step }
return String(step[step.startIndex..<separator.lowerBound])
}
/// Renders a build stage as one status line.
static func describe(_ stage: ImageBuildStage) -> String {
switch stage {