Skip to content

Commit 2de2253

Browse files
authored
Merge branch 'main' into sukru/engine-partial-reset
2 parents a5c51ce + 727a46e commit 2de2253

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

swift/Sources/Tools/image-segmenter/ImageSegmentationRunnerMain.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,9 @@ struct ImageSegmenterCLI: AsyncParsableCommand {
382382
}
383383
try writeImage(rendered, to: resolvedOutputPath)
384384
print("Output image written to \(resolvedOutputPath)")
385+
#if os(macOS)
385386
openFile(at: resolvedOutputPath)
387+
#endif
386388
}
387389

388390
// MARK: - Rendering
@@ -503,13 +505,15 @@ struct ImageSegmenterCLI: AsyncParsableCommand {
503505
}
504506
}
505507

508+
#if os(macOS)
506509
private func openFile(at path: String) {
507510
let expanded = NSString(string: path).expandingTildeInPath
508511
let process = Process()
509512
process.executableURL = URL(fileURLWithPath: "/usr/bin/open")
510513
process.arguments = [expanded]
511514
try? process.run()
512515
}
516+
#endif
513517

514518
// MARK: - Parity helpers (.npy reader + CGImage builder + metrics)
515519

0 commit comments

Comments
 (0)