1
1
mirror of https://github.com/github/semantic.git synced 2024-12-25 07:55:12 +03:00

Find the UI path one earlier.

This commit is contained in:
Rob Rix 2015-10-29 18:11:58 -04:00
parent d38c8b0ff0
commit 0d0c6c186d

View File

@ -87,7 +87,7 @@ guard let aSource = try arguments[1].map(Source.init) else { throw "need source
guard let bSource = try arguments[2].map(Source.init) else { throw "need source B" }
let temporary = try NSFileManager.defaultManager().URLForDirectory(.ItemReplacementDirectory, inDomain: .UserDomainMask, appropriateForURL: NSURL(fileURLWithPath: Process.arguments[0]).URLByDeletingLastPathComponent!, create: true)
let jsonURL = temporary.URLByAppendingPathComponent("diff.json")
guard let uiPath = arguments[4] else { throw "need ui path" }
guard let uiPath = arguments[3] 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)" }