We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6c3d8d7 commit 4dd291eCopy full SHA for 4dd291e
1 file changed
Tool/Sources/XcodeInspector/XcodeWindowInspector.swift
@@ -95,7 +95,7 @@ public final class WorkspaceXcodeWindowInspector: XcodeWindowInspector {
95
fileURLWithPath: path
96
.replacingOccurrences(of: "file://", with: "")
97
)
98
- return url
+ return adjustFileURL(url)
99
}
100
return nil
101
@@ -142,5 +142,14 @@ public final class WorkspaceXcodeWindowInspector: XcodeWindowInspector {
142
143
return lastGitDirectoryURL ?? firstDirectoryURL ?? workspaceURL
144
145
+
146
+ static func adjustFileURL(_ url: URL) -> URL {
147
+ if url.pathExtension == "playground",
148
+ FileManager.default.fileIsDirectory(atPath: url.path)
149
+ {
150
+ return url.appendingPathComponent("Contents.swift")
151
+ }
152
+ return url
153
154
155
0 commit comments