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.

List each JetBrains product's logs on their own

Țugui Dragoșfd158d05ebbd
diff --git a/Packages/PeelCore/Sources/PeelCore/Developer/DeveloperCaches.swift b/Packages/PeelCore/Sources/PeelCore/Developer/DeveloperCaches.swift
index 626258fc..40fc89ae 100644
--- a/Packages/PeelCore/Sources/PeelCore/Developer/DeveloperCaches.swift
+++ b/Packages/PeelCore/Sources/PeelCore/Developer/DeveloperCaches.swift
@@ -839,7 +839,8 @@ public enum DeveloperCaches {
Folder("Library/Caches/JetBrains/*/caches", .cache, source: "https://github.com/JetBrains/intellij-community/blob/0e6f75c33cccdcf8097ef9f0a9ca4a2af8c68cd2/platform/vfs-impl/src/com/intellij/openapi/vfs/newvfs/persistent/FSRecords.java#L80"),
Folder("Library/Caches/JetBrains/*/index", .cache, source: "https://github.com/JetBrains/intellij-community/blob/0e6f75c33cccdcf8097ef9f0a9ca4a2af8c68cd2/platform/util/src/com/intellij/openapi/application/PathManager.java#L648-L651"),
Folder("Library/Caches/JetBrains/*/tmp", .cache, source: "https://github.com/JetBrains/intellij-community/blob/0e6f75c33cccdcf8097ef9f0a9ca4a2af8c68cd2/platform/util/src/com/intellij/openapi/application/PathManager.java#L634-L636"),
- Folder("Library/Logs/JetBrains", .logs, source: "https://www.jetbrains.com/help/idea/directories-used-by-the-ide-to-store-settings-caches-plugins-and-logs.html"),
+ // A row for each product: JetBrains Toolbox runs from login and keeps its open log in `Toolbox` here.
+ Folder("Library/Logs/JetBrains", .logs, source: "https://www.jetbrains.com/help/idea/directories-used-by-the-ide-to-store-settings-caches-plugins-and-logs.html", rowsDepth: 1),
]),
Definition(id: "vscode", name: "Visual Studio Code", systemImage: "curlybraces", appBundleIdentifiers: ["com.microsoft.VSCode"], folders: [
Folder("Library/Application Support/Code/Cache", .cache, source: "https://github.com/electron/electron/blob/df79406cecfd393f38d5a18b83379d4ba85cc29b/shell/browser/net/network_context_service.cc#L94-L95"),
diff --git a/Packages/PeelCore/Tests/PeelCoreTests/DeveloperCachesTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/DeveloperCachesTests.swift
index 1d2a8eab..66d76e36 100644
--- a/Packages/PeelCore/Tests/PeelCoreTests/DeveloperCachesTests.swift
+++ b/Packages/PeelCore/Tests/PeelCoreTests/DeveloperCachesTests.swift
@@ -997,6 +997,16 @@ struct DeveloperCachesTests {
#expect(locations.allSatisfy { $0.kind == .deviceSupport && !$0.isRecommended })
}
+ @Test func listsEachJetBrainsProductsLogsOnTheirOwn() async throws {
+ let directory = try TemporaryDirectory()
+ try directory.file("Library/Logs/JetBrains/IntelliJIdea2026.2/idea.log", bytes: 4_000)
+ try directory.file("Library/Logs/JetBrains/Toolbox/toolbox.log", bytes: 4_000)
+
+ let locations = await scanned(directory.url).filter { $0.id == "jetbrains" }.flatMap(\.locations)
+
+ #expect(Set(locations.map(\.url.lastPathComponent)) == ["IntelliJIdea2026.2", "Toolbox"])
+ }
+
@Test func listsEachArchiveWithTheVersionItHoldsAndSelectsNone() async throws {
let directory = try TemporaryDirectory()
let archives = "Library/Developer/Xcode/Archives"