// `swift run WaiApp` opens the player; `swift run WaiApp --replay sample-session.json` replays a // recorded session through the sink, with no window, and checks its bundle. import Foundation if let i = CommandLine.arguments.firstIndex(of: "--replay"), i + 1 < CommandLine.arguments.count { do { exit(try Replay.run(path: CommandLine.arguments[i + 1]) ? 0 : 1) } catch { print("replay: \(error)") exit(2) } } PlayerApp.main()