Skip to content

Commit 8c498d5

Browse files
fix bug extracting platform (#147)
1 parent 04e5c52 commit 8c498d5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

project/Component/NefRender/Render.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public struct Render<A> {
5555
func readPlatform(playground: RenderingURL) -> EnvIO<Environment, RenderError, Platform> {
5656
let info = playground.url.appendingPathComponent("contents.xcplayground")
5757
guard let xcplayground = try? String(contentsOf: info),
58-
let rawPlatform = xcplayground.matches(pattern: "(?<=target-platform=').*(?='*display-mode)").first,
58+
let rawPlatform = xcplayground.matches(pattern: "(?<=target-platform=').*(?=>)").first,
5959
let extractedPlatform = rawPlatform.components(separatedBy: "'").first?.lowercased(),
6060
let platform = Platform(rawValue: extractedPlatform) else {
6161
return EnvIO.raiseError(.extractPlatform(info))^

0 commit comments

Comments
 (0)