Skip to content

armgit / peel

Public Imported from GitHub
0

Uninstall Mac apps with every file they leave behind, and see why each belongs. Free up space, fine-tune macOS, and set up Terminal.

Let only a test's first stand-in question wait

Țugui Dragoșccb81ba77795
diff --git a/Packages/PeelCore/Tests/PeelCoreTests/InstallersTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/InstallersTests.swift
index d6c0de28..db882956 100644
--- a/Packages/PeelCore/Tests/PeelCoreTests/InstallersTests.swift
+++ b/Packages/PeelCore/Tests/PeelCoreTests/InstallersTests.swift
@@ -789,8 +789,12 @@ struct InstallersTests {
installedApps: [], home: home, root: home, exclusions: .none, minimumSize: 100_000,
measure: LeftoverScanner.walk,
canList: { url in
- asked.withLock { $0.append(url.lastPathComponent) }
- if url.lastPathComponent == "Downloads" {
+ let isFirst = asked.withLock { asked in
+ asked.append(url.lastPathComponent)
+ return asked.count == 1
+ }
+ // Only the first question waits, so a scan that asks again fails here rather than waiting for good.
+ if isFirst, url.lastPathComponent == "Downloads" {
isAsked.signal()
answer.wait()
}