1
1
mirror of https://github.com/github/semantic.git synced 2024-11-28 10:15:55 +03:00

Get the path from the info plist.

This commit is contained in:
Rob Rix 2015-10-29 18:23:32 -04:00
parent 58df210d53
commit ab49d4ab53

View File

@ -86,7 +86,7 @@ let arguments = BoundsCheckedArray(array: Process.arguments)
guard let aSource = try arguments[1].map(Source.init) else { throw "need source A" }
guard let bSource = try arguments[2].map(Source.init) else { throw "need source B" }
let jsonURL = NSURL(fileURLWithPath: NSTemporaryDirectory(), isDirectory: true).URLByAppendingPathComponent("diff.json")
guard let uiPath = arguments[3] else { throw "need ui path" }
guard let uiPath = NSBundle.mainBundle().infoDictionary?["PathToUISource"] as? String else { throw "need ui path" }
guard aSource.type == bSource.type else { throw "cant compare files of different types" }
guard let parser = Source.languagesByType[aSource.type].map(termWithInput) else { throw "dont know how to parse files of type \(aSource.type)" }