Skip to content

Run Windows games on Apple Silicon — free, open source, with an open compatibility database that tells you what actually works.

recovery: the winetricks reason stays the last thing read, the log pointer goes before it (my 5373288 broke the assertion that protects it); the pointer is now itself protected

Gauthier Piarrette2b90f814c645
diff --git a/Sources/HighballKit/Recovery.swift b/Sources/HighballKit/Recovery.swift
index b313057..eecdb24 100644
--- a/Sources/HighballKit/Recovery.swift
+++ b/Sources/HighballKit/Recovery.swift
@@ -72,10 +72,11 @@ public struct Recovery: Equatable, Sendable {
// The reason is the script's own last line, and asking for it under Details cost
// #135 two rounds with nothing pasted back. Say it up front.
var meaning = "It downloads its files from the internet as it runs, and those servers refuse now and then, so trying again in a few minutes often works."
- if let reason = Self.winetricksReason(output) { meaning += " It said: \(reason)" }
// Where the whole run is, so a report can carry it: the newest winetricks file in the
- // logs folder, which Troubleshooting opens.
+ // logs folder, which Troubleshooting opens. Said before the script's own words, because
+ // the reason stays the last thing anyone reads (highball#135).
meaning += " The full output is in Highball's logs folder, in the newest file with winetricks in its name."
+ if let reason = Self.winetricksReason(output) { meaning += " It said: \(reason)" }
return Recovery(headline: "\(what) didn't finish.", meaning: meaning,
actionTitle: "Try again", action: .retry)
case let .processFailed(command, _, _):
diff --git a/Tests/HighballKitTests/RegressionTests.swift b/Tests/HighballKitTests/RegressionTests.swift
index 47a7073..ed63d7e 100644
--- a/Tests/HighballKitTests/RegressionTests.swift
+++ b/Tests/HighballKitTests/RegressionTests.swift
@@ -1138,6 +1138,9 @@ extension RegressionTests {
XCTAssertEqual(tricks.headline, "Installing corefonts with winetricks didn't finish.", "not '/bin/bash didn't finish' (highball#135)")
XCTAssertFalse(tricks.meaning.contains("fresh copy"))
XCTAssertFalse(tricks.meaning.contains("It said"), "no reason line when winetricks printed nothing")
+ // The step writes its own log since 2026-09-22; saying where it is turns three unanswerable
+ // reports into ones that carry the output (highball#135, #180, #183).
+ XCTAssertTrue(tricks.meaning.contains("logs folder"), tricks.meaning)
// The reason is the script's own last real line, ahead of asking for Details (highball#135).
let out = "warning: taskset/cpuset not available on your platform!\nExecuting mkdir -p /e/cache\n------------------------------------------------------\nwarning: /usr/bin/curl failed to download arial32.exe: SourceForge returned 503\n------------------------------------------------------\n"
let said = Recovery.describe(HighballError.processFailed(command: "/bin/bash /e/tools/winetricks --unattended corefonts", status: 1, output: out))