Skip to content

Commit d804a9a

Browse files
committed
Save sourcekit-lsp diagnose bundles in subdirectories of temporary directory
Finder seems to generally struggle opening a temporary directory with many subfolders and eg. hang when zipping the diagnose bundle. Place the diagnose folders in a dedicated subfolder to avoid this.
1 parent bce4cf6 commit d804a9a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Sources/Diagnose/DiagnoseCommand.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,9 @@ public struct DiagnoseCommand: AsyncParsableCommand {
368368
if let bundleOutputPath = self.bundleOutputPath {
369369
URL(fileURLWithPath: bundleOutputPath)
370370
} else {
371-
FileManager.default.temporaryDirectory.appendingPathComponent("sourcekit-lsp-diagnose-\(date)")
371+
FileManager.default.temporaryDirectory
372+
.appendingPathComponent("sourcekit-lsp-diagnose")
373+
.appendingPathComponent("sourcekit-lsp-diagnose-\(date)")
372374
}
373375
try FileManager.default.createDirectory(at: bundlePath, withIntermediateDirectories: true)
374376

0 commit comments

Comments
 (0)