{"action":"created","comment":{"url":"https://api.github.com/repos/Carthage/Carthage/pulls/comments/25998034","id":25998034,"diff_hunk":"@@ -93,33 +92,15 @@ public struct BuildCommand: CommandType {\n \t\treturn (stdoutSignal, buildSignal)\n \t}\n \n-\t/// Opens a temporary file for logging, returning the handle and the URL to\n-\t/// the file on disk.\n-\tprivate func openTemporaryLogFile(options: BuildOptions) -> ColdSignal<(NSFileHandle, NSURL?)> {\n+\t/// Creates a sink for logging, returning the sink and the URL to any\n+\t/// temporary file on disk.\n+\tprivate func createLoggingSink(options: BuildOptions) -> ColdSignal<(FileSink, NSURL?)> {\n \t\tif options.verbose {\n-\t\t\tlet out: (NSFileHandle, NSURL?) = (NSFileHandle.fileHandleWithStandardOutput(), nil)\n-\t\t\treturn .single(out)\n-\t\t}\n-\n-\t\treturn ColdSignal.lazy {\n-\t\t\tvar temporaryDirectoryTemplate: ContiguousArray<CChar> = NSTemporaryDirectory().stringByAppendingPathComponent(\"carthage-xcodebuild.XXXXXX.log\").nulTerminatedUTF8.map { CChar($0) }\n-\t\t\tlet logFD = temporaryDirectoryTemplate.withUnsafeMutableBufferPointer { (inout template: UnsafeMutableBufferPointer<CChar>) -> Int32 in\n-\t\t\t\treturn mkstemps(template.baseAddress, 4)\n-\t\t\t}\n-\n-\t\t\tif logFD < 0 {\n-\t\t\t\treturn .error(NSError(domain: NSPOSIXErrorDomain, code: Int(errno), userInfo: nil))\n-\t\t\t}\n-\n-\t\t\tlet temporaryPath = temporaryDirectoryTemplate.withUnsafeBufferPointer { (ptr: UnsafeBufferPointer<CChar>) -> String in\n-\t\t\t\treturn String.fromCString(ptr.baseAddress)!\n-\t\t\t}\n-\n-\t\t\tlet stdoutHandle = NSFileHandle(fileDescriptor: logFD, closeOnDealloc: true)\n-\t\t\tlet temporaryURL = NSURL.fileURLWithPath(temporaryPath, isDirectory: false)!\n-\n-\t\t\tlet out: (NSFileHandle, NSURL?) = (stdoutHandle, temporaryURL)","path":"Source/carthage/Build.swift","position":53,"original_position":53,"commit_id":"494cbc8bc77eaf5078e544e443adc1458f4e114c","original_commit_id":"494cbc8bc77eaf5078e544e443adc1458f4e114c","user":{"login":"robrix","id":59671,"avatar_url":"https://avatars.githubusercontent.com/u/59671?v=3","gravatar_id":"","url":"https://api.github.com/users/robrix","html_url":"https://github.com/robrix","followers_url":"https://api.github.com/users/robrix/followers","following_url":"https://api.github.com/users/robrix/following{/other_user}","gists_url":"https://api.github.com/users/robrix/gists{/gist_id}","starred_url":"https://api.github.com/users/robrix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robrix/subscriptions","organizations_url":"https://api.github.com/users/robrix/orgs","repos_url":"https://api.github.com/users/robrix/repos","events_url":"https://api.github.com/users/robrix/events{/privacy}","received_events_url":"https://api.github.com/users/robrix/received_events","type":"User","site_admin":true},"body":"This is pretty nice.","created_at":"2015-03-07T18:18:31Z","updated_at":"2015-03-07T18:18:31Z","html_url":"https://github.com/Carthage/Carthage/pull/376#discussion_r25998034","pull_request_url":"https://api.github.com/repos/Carthage/Carthage/pulls/376","_links":{"self":{"href":"https://api.github.com/repos/Carthage/Carthage/pulls/comments/25998034"},"html":{"href":"https://github.com/Carthage/Carthage/pull/376#discussion_r25998034"},"pull_request":{"href":"https://api.github.com/repos/Carthage/Carthage/pulls/376"}}},"pull_request":{"url":"https://api.github.com/repos/Carthage/Carthage/pulls/376","id":30698792,"html_url":"https://github.com/Carthage/Carthage/pull/376","diff_url":"https://github.com/Carthage/Carthage/pull/376.diff","patch_url":"https://github.com/Carthage/Carthage/pull/376.patch","issue_url":"https://api.github.com/repos/Carthage/Carthage/issues/376","number":376,"state":"open","locked":false,"title":"Encapsulate log streaming in a FileSink type","user":{"login":"jspahrsummers","id":432536,"avatar_url":"https://avatars.githubusercontent.com/u/432536?v=3","gravatar_id":"","url":"https://api.github.com/users/jspahrsummers","html_url":"https://github.com/jspahrsummers","followers_url":"https://api.github.com/users/jspahrsummers/followers","following_url":"https://api.github.com/users/jspahrsummers/following{/other_user}","gists_url":"https://api.github.com/users/jspahrsummers/gists{/gist_id}","starred_url":"https://api.github.com/users/jspahrsummers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jspahrsummers/subscriptions","organizations_url":"https://api.github.com/users/jspahrsummers/orgs","repos_url":"https://api.github.com/users/jspahrsummers/repos","events_url":"https://api.github.com/users/jspahrsummers/events{/privacy}","received_events_url":"https://api.github.com/users/jspahrsummers/received_events","type":"User","site_admin":true},"body":"Resolves #350.\r\n\r\n**To do:**\r\n\r\n - [x] Unit tests for `FileSink`","created_at":"2015-03-07T06:58:17Z","updated_at":"2015-03-07T18:18:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3da5627c907494ca2a1bbc5892e50ac84772e2db","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Carthage/Carthage/pulls/376/commits","review_comments_url":"https://api.github.com/repos/Carthage/Carthage/pulls/376/comments","review_comment_url":"https://api.github.com/repos/Carthage/Carthage/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Carthage/Carthage/issues/376/comments","statuses_url":"https://api.github.com/repos/Carthage/Carthage/statuses/494cbc8bc77eaf5078e544e443adc1458f4e114c","head":{"label":"Carthage:encapsulate-file-handling","ref":"encapsulate-file-handling","sha":"494cbc8bc77eaf5078e544e443adc1458f4e114c","user":{"login":"Carthage","id":9146792,"avatar_url":"https://avatars.githubusercontent.com/u/9146792?v=3","gravatar_id":"","url":"https://api.github.com/users/Carthage","html_url":"https://github.com/Carthage","followers_url":"https://api.github.com/users/Carthage/followers","following_url":"https://api.github.com/users/Carthage/following{/other_user}","gists_url":"https://api.github.com/users/Carthage/gists{/gist_id}","starred_url":"https://api.github.com/users/Carthage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Carthage/subscriptions","organizations_url":"https://api.github.com/users/Carthage/orgs","repos_url":"https://api.github.com/users/Carthage/repos","events_url":"https://api.github.com/users/Carthage/events{/privacy}","received_events_url":"https://api.github.com/users/Carthage/received_events","type":"Organization","site_admin":false},"repo":{"id":25050844,"name":"Carthage","full_name":"Carthage/Carthage","owner":{"login":"Carthage","id":9146792,"avatar_url":"https://avatars.githubusercontent.com/u/9146792?v=3","gravatar_id":"","url":"https://api.github.com/users/Carthage","html_url":"https://github.com/Carthage","followers_url":"https://api.github.com/users/Carthage/followers","following_url":"https://api.github.com/users/Carthage/following{/other_user}","gists_url":"https://api.github.com/users/Carthage/gists{/gist_id}","starred_url":"https://api.github.com/users/Carthage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Carthage/subscriptions","organizations_url":"https://api.github.com/users/Carthage/orgs","repos_url":"https://api.github.com/users/Carthage/repos","events_url":"https://api.github.com/users/Carthage/events{/privacy}","received_events_url":"https://api.github.com/users/Carthage/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Carthage/Carthage","description":"A simple, decentralized dependency manager for Cocoa","fork":false,"url":"https://api.github.com/repos/Carthage/Carthage","forks_url":"https://api.github.com/repos/Carthage/Carthage/forks","keys_url":"https://api.github.com/repos/Carthage/Carthage/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Carthage/Carthage/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Carthage/Carthage/teams","hooks_url":"https://api.github.com/repos/Carthage/Carthage/hooks","issue_events_url":"https://api.github.com/repos/Carthage/Carthage/issues/events{/number}","events_url":"https://api.github.com/repos/Carthage/Carthage/events","assignees_url":"https://api.github.com/repos/Carthage/Carthage/assignees{/user}","branches_url":"https://api.github.com/repos/Carthage/Carthage/branches{/branch}","tags_url":"https://api.github.com/repos/Carthage/Carthage/tags","blobs_url":"https://api.github.com/repos/Carthage/Carthage/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Carthage/Carthage/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Carthage/Carthage/git/refs{/sha}","trees_url":"https://api.github.com/repos/Carthage/Carthage/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Carthage/Carthage/statuses/{sha}","languages_url":"https://api.github.com/repos/Carthage/Carthage/languages","stargazers_url":"https://api.github.com/repos/Carthage/Carthage/stargazers","contributors_url":"https://api.github.com/repos/Carthage/Carthage/contributors","subscribers_url":"https://api.github.com/repos/Carthage/Carthage/subscribers","subscription_url":"https://api.github.com/repos/Carthage/Carthage/subscription","commits_url":"https://api.github.com/repos/Carthage/Carthage/commits{/sha}","git_commits_url":"https://api.github.com/repos/Carthage/Carthage/git/commits{/sha}","comments_url":"https://api.github.com/repos/Carthage/Carthage/comments{/number}","issue_comment_url":"https://api.github.com/repos/Carthage/Carthage/issues/comments{/number}","contents_url":"https://api.github.com/repos/Carthage/Carthage/contents/{+path}","compare_url":"https://api.github.com/repos/Carthage/Carthage/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Carthage/Carthage/merges","archive_url":"https://api.github.com/repos/Carthage/Carthage/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Carthage/Carthage/downloads","issues_url":"https://api.github.com/repos/Carthage/Carthage/issues{/number}","pulls_url":"https://api.github.com/repos/Carthage/Carthage/pulls{/number}","milestones_url":"https://api.github.com/repos/Carthage/Carthage/milestones{/number}","notifications_url":"https://api.github.com/repos/Carthage/Carthage/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Carthage/Carthage/labels{/name}","releases_url":"https://api.github.com/repos/Carthage/Carthage/releases{/id}","created_at":"2014-10-10T19:54:55Z","updated_at":"2015-03-07T17:04:06Z","pushed_at":"2015-03-07T07:37:02Z","git_url":"git://github.com/Carthage/Carthage.git","ssh_url":"git@github.com:Carthage/Carthage.git","clone_url":"https://github.com/Carthage/Carthage.git","svn_url":"https://github.com/Carthage/Carthage","homepage":"","size":9494,"stargazers_count":2149,"watchers_count":2149,"language":"Swift","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":72,"mirror_url":null,"open_issues_count":48,"forks":72,"open_issues":48,"watchers":2149,"default_branch":"master"}},"base":{"label":"Carthage:master","ref":"master","sha":"7a0153cc164e301c46527f6e20c886728a0dc218","user":{"login":"Carthage","id":9146792,"avatar_url":"https://avatars.githubusercontent.com/u/9146792?v=3","gravatar_id":"","url":"https://api.github.com/users/Carthage","html_url":"https://github.com/Carthage","followers_url":"https://api.github.com/users/Carthage/followers","following_url":"https://api.github.com/users/Carthage/following{/other_user}","gists_url":"https://api.github.com/users/Carthage/gists{/gist_id}","starred_url":"https://api.github.com/users/Carthage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Carthage/subscriptions","organizations_url":"https://api.github.com/users/Carthage/orgs","repos_url":"https://api.github.com/users/Carthage/repos","events_url":"https://api.github.com/users/Carthage/events{/privacy}","received_events_url":"https://api.github.com/users/Carthage/received_events","type":"Organization","site_admin":false},"repo":{"id":25050844,"name":"Carthage","full_name":"Carthage/Carthage","owner":{"login":"Carthage","id":9146792,"avatar_url":"https://avatars.githubusercontent.com/u/9146792?v=3","gravatar_id":"","url":"https://api.github.com/users/Carthage","html_url":"https://github.com/Carthage","followers_url":"https://api.github.com/users/Carthage/followers","following_url":"https://api.github.com/users/Carthage/following{/other_user}","gists_url":"https://api.github.com/users/Carthage/gists{/gist_id}","starred_url":"https://api.github.com/users/Carthage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Carthage/subscriptions","organizations_url":"https://api.github.com/users/Carthage/orgs","repos_url":"https://api.github.com/users/Carthage/repos","events_url":"https://api.github.com/users/Carthage/events{/privacy}","received_events_url":"https://api.github.com/users/Carthage/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Carthage/Carthage","description":"A simple, decentralized dependency manager for Cocoa","fork":false,"url":"https://api.github.com/repos/Carthage/Carthage","forks_url":"https://api.github.com/repos/Carthage/Carthage/forks","keys_url":"https://api.github.com/repos/Carthage/Carthage/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Carthage/Carthage/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Carthage/Carthage/teams","hooks_url":"https://api.github.com/repos/Carthage/Carthage/hooks","issue_events_url":"https://api.github.com/repos/Carthage/Carthage/issues/events{/number}","events_url":"https://api.github.com/repos/Carthage/Carthage/events","assignees_url":"https://api.github.com/repos/Carthage/Carthage/assignees{/user}","branches_url":"https://api.github.com/repos/Carthage/Carthage/branches{/branch}","tags_url":"https://api.github.com/repos/Carthage/Carthage/tags","blobs_url":"https://api.github.com/repos/Carthage/Carthage/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Carthage/Carthage/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Carthage/Carthage/git/refs{/sha}","trees_url":"https://api.github.com/repos/Carthage/Carthage/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Carthage/Carthage/statuses/{sha}","languages_url":"https://api.github.com/repos/Carthage/Carthage/languages","stargazers_url":"https://api.github.com/repos/Carthage/Carthage/stargazers","contributors_url":"https://api.github.com/repos/Carthage/Carthage/contributors","subscribers_url":"https://api.github.com/repos/Carthage/Carthage/subscribers","subscription_url":"https://api.github.com/repos/Carthage/Carthage/subscription","commits_url":"https://api.github.com/repos/Carthage/Carthage/commits{/sha}","git_commits_url":"https://api.github.com/repos/Carthage/Carthage/git/commits{/sha}","comments_url":"https://api.github.com/repos/Carthage/Carthage/comments{/number}","issue_comment_url":"https://api.github.com/repos/Carthage/Carthage/issues/comments{/number}","contents_url":"https://api.github.com/repos/Carthage/Carthage/contents/{+path}","compare_url":"https://api.github.com/repos/Carthage/Carthage/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Carthage/Carthage/merges","archive_url":"https://api.github.com/repos/Carthage/Carthage/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Carthage/Carthage/downloads","issues_url":"https://api.github.com/repos/Carthage/Carthage/issues{/number}","pulls_url":"https://api.github.com/repos/Carthage/Carthage/pulls{/number}","milestones_url":"https://api.github.com/repos/Carthage/Carthage/milestones{/number}","notifications_url":"https://api.github.com/repos/Carthage/Carthage/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Carthage/Carthage/labels{/name}","releases_url":"https://api.github.com/repos/Carthage/Carthage/releases{/id}","created_at":"2014-10-10T19:54:55Z","updated_at":"2015-03-07T17:04:06Z","pushed_at":"2015-03-07T07:37:02Z","git_url":"git://github.com/Carthage/Carthage.git","ssh_url":"git@github.com:Carthage/Carthage.git","clone_url":"https://github.com/Carthage/Carthage.git","svn_url":"https://github.com/Carthage/Carthage","homepage":"","size":9494,"stargazers_count":2149,"watchers_count":2149,"language":"Swift","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":72,"mirror_url":null,"open_issues_count":48,"forks":72,"open_issues":48,"watchers":2149,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Carthage/Carthage/pulls/376"},"html":{"href":"https://github.com/Carthage/Carthage/pull/376"},"issue":{"href":"https://api.github.com/repos/Carthage/Carthage/issues/376"},"comments":{"href":"https://api.github.com/repos/Carthage/Carthage/issues/376/comments"},"review_comments":{"href":"https://api.github.com/repos/Carthage/Carthage/pulls/376/comments"},"review_comment":{"href":"https://api.github.com/repos/Carthage/Carthage/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Carthage/Carthage/pulls/376/commits"},"statuses":{"href":"https://api.github.com/repos/Carthage/Carthage/statuses/494cbc8bc77eaf5078e544e443adc1458f4e114c"}}}}