{"action":"created","issue":{"url":"https://api.github.com/repos/PromiseKit/Foundation/issues/15","repository_url":"https://api.github.com/repos/PromiseKit/Foundation","labels_url":"https://api.github.com/repos/PromiseKit/Foundation/issues/15/labels{/name}","comments_url":"https://api.github.com/repos/PromiseKit/Foundation/issues/15/comments","events_url":"https://api.github.com/repos/PromiseKit/Foundation/issues/15/events","html_url":"https://github.com/PromiseKit/Foundation/pull/15","id":365597586,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE5NDgwMzcx","number":15,"title":"Remove deprecated usage of -[NSTask launch] on supported OS versions","user":{"login":"CharlesJS","id":1907560,"node_id":"MDQ6VXNlcjE5MDc1NjA=","avatar_url":"https://avatars2.githubusercontent.com/u/1907560?v=4","gravatar_id":"","url":"https://api.github.com/users/CharlesJS","html_url":"https://github.com/CharlesJS","followers_url":"https://api.github.com/users/CharlesJS/followers","following_url":"https://api.github.com/users/CharlesJS/following{/other_user}","gists_url":"https://api.github.com/users/CharlesJS/gists{/gist_id}","starred_url":"https://api.github.com/users/CharlesJS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CharlesJS/subscriptions","organizations_url":"https://api.github.com/users/CharlesJS/orgs","repos_url":"https://api.github.com/users/CharlesJS/repos","events_url":"https://api.github.com/users/CharlesJS/events{/privacy}","received_events_url":"https://api.github.com/users/CharlesJS/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-01T18:59:24Z","updated_at":"2018-10-01T19:29:47Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/PromiseKit/Foundation/pulls/15","html_url":"https://github.com/PromiseKit/Foundation/pull/15","diff_url":"https://github.com/PromiseKit/Foundation/pull/15.diff","patch_url":"https://github.com/PromiseKit/Foundation/pull/15.patch"},"body":"On macOS 10.13, the -[NSTask launch] method has been deprecated and replaced by a newer method, -launchAndReturnError:. The newer method solves a serious problem with NSTask in that if the executable cannot be launched at runtime, which can easily happen if the executable bit is not set in the permissions mode, -launch will throw an exception. Since Swift code cannot natively handle exceptions, this is likely to crash the entire app. By contrast, the -launchAndReturnError: method simply returns an error describing what went wrong, so that the program can decide how to proceed. This seems much more in line with PromiseKit's mission as a project.\r\n\r\nThis commit request is a simple one; it checks if the user is running macOS 10.13 or greater, and if so, it uses -launchAndReturnError: instead of -launch. If an error is returned, it is passed to the resolver so that it will be handled by the next `catch` block in the promise chain.\r\n\r\nI hope you've found this useful."},"comment":{"url":"https://api.github.com/repos/PromiseKit/Foundation/issues/comments/426033249","html_url":"https://github.com/PromiseKit/Foundation/pull/15#issuecomment-426033249","issue_url":"https://api.github.com/repos/PromiseKit/Foundation/issues/15","id":426033249,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNjAzMzI0OQ==","user":{"login":"mxcl","id":58962,"node_id":"MDQ6VXNlcjU4OTYy","avatar_url":"https://avatars2.githubusercontent.com/u/58962?v=4","gravatar_id":"","url":"https://api.github.com/users/mxcl","html_url":"https://github.com/mxcl","followers_url":"https://api.github.com/users/mxcl/followers","following_url":"https://api.github.com/users/mxcl/following{/other_user}","gists_url":"https://api.github.com/users/mxcl/gists{/gist_id}","starred_url":"https://api.github.com/users/mxcl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mxcl/subscriptions","organizations_url":"https://api.github.com/users/mxcl/orgs","repos_url":"https://api.github.com/users/mxcl/repos","events_url":"https://api.github.com/users/mxcl/events{/privacy}","received_events_url":"https://api.github.com/users/mxcl/received_events","type":"User","site_admin":false},"created_at":"2018-10-01T19:29:47Z","updated_at":"2018-10-01T19:29:47Z","author_association":"MEMBER","body":"Thank you. I did this for Swift already and missed this."}}
{"actor":{"display_login":"mxcl"}}