{"action":"created","comment":{"url":"https://api.github.com/repos/Valloric/ycmd/pulls/comments/31868440","id":31868440,"diff_hunk":"@@ -46,16 +49,17 @@ def __init__( self, user_options ):\n \n     binarypath = utils.PathToFirstExistingExecutable( [ 'tsserver' ] )\n     if not binarypath:\n-      raise RuntimeError(\n-        'tsserver not found. TypeScript 1.5 or higher is required' )\n+      _logger.error( BINARY_NOT_FOUND_MESSAGE )\n+      raise RuntimeError( BINARY_NOT_FOUND_MESSAGE )\n \n     # Each request sent to tsserver must have a sequence id.\n     # Responses contain the id sent in the corresponding request.\n     self._sequenceid = 0\n     self._tsserver_handle = utils.SafePopen( binarypath,\n-      stdout = subprocess.PIPE,\n-      stdin  = subprocess.PIPE\n-    )\n+                                             stdout = subprocess.PIPE,\n+                                             stdin = subprocess.PIPE,\n+                                             stderr = subprocess.STDOUT,\n+                                             universal_newlines = True )","path":"ycmd/completers/typescript/typescript_completer.py","position":29,"original_position":29,"commit_id":"402a7a27c0abc6713f4157e2e8195aca1419ee66","original_commit_id":"402a7a27c0abc6713f4157e2e8195aca1419ee66","user":{"login":"vheon","id":90633,"avatar_url":"https://avatars.githubusercontent.com/u/90633?v=3","gravatar_id":"","url":"https://api.github.com/users/vheon","html_url":"https://github.com/vheon","followers_url":"https://api.github.com/users/vheon/followers","following_url":"https://api.github.com/users/vheon/following{/other_user}","gists_url":"https://api.github.com/users/vheon/gists{/gist_id}","starred_url":"https://api.github.com/users/vheon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vheon/subscriptions","organizations_url":"https://api.github.com/users/vheon/orgs","repos_url":"https://api.github.com/users/vheon/repos","events_url":"https://api.github.com/users/vheon/events{/privacy}","received_events_url":"https://api.github.com/users/vheon/received_events","type":"User","site_admin":false},"body":"Why is this needed?","created_at":"2015-06-06T14:28:42Z","updated_at":"2015-06-06T14:28:42Z","html_url":"https://github.com/Valloric/ycmd/pull/156#discussion_r31868440","pull_request_url":"https://api.github.com/repos/Valloric/ycmd/pulls/156","_links":{"self":{"href":"https://api.github.com/repos/Valloric/ycmd/pulls/comments/31868440"},"html":{"href":"https://github.com/Valloric/ycmd/pull/156#discussion_r31868440"},"pull_request":{"href":"https://api.github.com/repos/Valloric/ycmd/pulls/156"}}},"pull_request":{"url":"https://api.github.com/repos/Valloric/ycmd/pulls/156","id":37091038,"html_url":"https://github.com/Valloric/ycmd/pull/156","diff_url":"https://github.com/Valloric/ycmd/pull/156.diff","patch_url":"https://github.com/Valloric/ycmd/pull/156.patch","issue_url":"https://api.github.com/repos/Valloric/ycmd/issues/156","number":156,"state":"open","locked":false,"title":"Fix TypeScript completer on Windows","user":{"login":"micbou","id":10026824,"avatar_url":"https://avatars.githubusercontent.com/u/10026824?v=3","gravatar_id":"","url":"https://api.github.com/users/micbou","html_url":"https://github.com/micbou","followers_url":"https://api.github.com/users/micbou/followers","following_url":"https://api.github.com/users/micbou/following{/other_user}","gists_url":"https://api.github.com/users/micbou/gists{/gist_id}","starred_url":"https://api.github.com/users/micbou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/micbou/subscriptions","organizations_url":"https://api.github.com/users/micbou/orgs","repos_url":"https://api.github.com/users/micbou/repos","events_url":"https://api.github.com/users/micbou/events{/privacy}","received_events_url":"https://api.github.com/users/micbou/received_events","type":"User","site_admin":false},"body":"cc @icholy \r\n\r\nOn Windows, TSServer executable is a `.cmd` file but `find_executable` works only for `.exe` files so we need our own implementation of the `find_executable` function. This new function tries to find executable with `.exe`, `.bat` and `.cmd` extensions on Windows. Its behavior should be identical to `find_executable` on others platforms.\r\n\r\nThis fix is not enough. We also need to set the [`universal_newlines` option](https://docs.python.org/2/library/subprocess.html#subprocess.Popen) to `True` (certainly because TSServer only accept `\\n` for newlines) and to redirect `stderr` to `stdout` (not sure why but this is caused by the `creationflags = CREATE_NO_WINDOW` option in `utils.SafePopen`) when starting TSServer.\r\n\r\nI also added a log when the binary is not found and formatted a 80+ line.\r\n\r\nCLA signed.","created_at":"2015-06-06T14:20:14Z","updated_at":"2015-06-06T14:28:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"898ee67df233b3d64036585d9a0c7891de2e3e68","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Valloric/ycmd/pulls/156/commits","review_comments_url":"https://api.github.com/repos/Valloric/ycmd/pulls/156/comments","review_comment_url":"https://api.github.com/repos/Valloric/ycmd/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Valloric/ycmd/issues/156/comments","statuses_url":"https://api.github.com/repos/Valloric/ycmd/statuses/402a7a27c0abc6713f4157e2e8195aca1419ee66","head":{"label":"micbou:typescript-windows","ref":"typescript-windows","sha":"402a7a27c0abc6713f4157e2e8195aca1419ee66","user":{"login":"micbou","id":10026824,"avatar_url":"https://avatars.githubusercontent.com/u/10026824?v=3","gravatar_id":"","url":"https://api.github.com/users/micbou","html_url":"https://github.com/micbou","followers_url":"https://api.github.com/users/micbou/followers","following_url":"https://api.github.com/users/micbou/following{/other_user}","gists_url":"https://api.github.com/users/micbou/gists{/gist_id}","starred_url":"https://api.github.com/users/micbou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/micbou/subscriptions","organizations_url":"https://api.github.com/users/micbou/orgs","repos_url":"https://api.github.com/users/micbou/repos","events_url":"https://api.github.com/users/micbou/events{/privacy}","received_events_url":"https://api.github.com/users/micbou/received_events","type":"User","site_admin":false},"repo":{"id":31660902,"name":"ycmd","full_name":"micbou/ycmd","owner":{"login":"micbou","id":10026824,"avatar_url":"https://avatars.githubusercontent.com/u/10026824?v=3","gravatar_id":"","url":"https://api.github.com/users/micbou","html_url":"https://github.com/micbou","followers_url":"https://api.github.com/users/micbou/followers","following_url":"https://api.github.com/users/micbou/following{/other_user}","gists_url":"https://api.github.com/users/micbou/gists{/gist_id}","starred_url":"https://api.github.com/users/micbou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/micbou/subscriptions","organizations_url":"https://api.github.com/users/micbou/orgs","repos_url":"https://api.github.com/users/micbou/repos","events_url":"https://api.github.com/users/micbou/events{/privacy}","received_events_url":"https://api.github.com/users/micbou/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/micbou/ycmd","description":"A code-completion & code-comprehension server","fork":true,"url":"https://api.github.com/repos/micbou/ycmd","forks_url":"https://api.github.com/repos/micbou/ycmd/forks","keys_url":"https://api.github.com/repos/micbou/ycmd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/micbou/ycmd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/micbou/ycmd/teams","hooks_url":"https://api.github.com/repos/micbou/ycmd/hooks","issue_events_url":"https://api.github.com/repos/micbou/ycmd/issues/events{/number}","events_url":"https://api.github.com/repos/micbou/ycmd/events","assignees_url":"https://api.github.com/repos/micbou/ycmd/assignees{/user}","branches_url":"https://api.github.com/repos/micbou/ycmd/branches{/branch}","tags_url":"https://api.github.com/repos/micbou/ycmd/tags","blobs_url":"https://api.github.com/repos/micbou/ycmd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/micbou/ycmd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/micbou/ycmd/git/refs{/sha}","trees_url":"https://api.github.com/repos/micbou/ycmd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/micbou/ycmd/statuses/{sha}","languages_url":"https://api.github.com/repos/micbou/ycmd/languages","stargazers_url":"https://api.github.com/repos/micbou/ycmd/stargazers","contributors_url":"https://api.github.com/repos/micbou/ycmd/contributors","subscribers_url":"https://api.github.com/repos/micbou/ycmd/subscribers","subscription_url":"https://api.github.com/repos/micbou/ycmd/subscription","commits_url":"https://api.github.com/repos/micbou/ycmd/commits{/sha}","git_commits_url":"https://api.github.com/repos/micbou/ycmd/git/commits{/sha}","comments_url":"https://api.github.com/repos/micbou/ycmd/comments{/number}","issue_comment_url":"https://api.github.com/repos/micbou/ycmd/issues/comments{/number}","contents_url":"https://api.github.com/repos/micbou/ycmd/contents/{+path}","compare_url":"https://api.github.com/repos/micbou/ycmd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/micbou/ycmd/merges","archive_url":"https://api.github.com/repos/micbou/ycmd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/micbou/ycmd/downloads","issues_url":"https://api.github.com/repos/micbou/ycmd/issues{/number}","pulls_url":"https://api.github.com/repos/micbou/ycmd/pulls{/number}","milestones_url":"https://api.github.com/repos/micbou/ycmd/milestones{/number}","notifications_url":"https://api.github.com/repos/micbou/ycmd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/micbou/ycmd/labels{/name}","releases_url":"https://api.github.com/repos/micbou/ycmd/releases{/id}","created_at":"2015-03-04T14:26:37Z","updated_at":"2015-05-08T19:46:19Z","pushed_at":"2015-06-06T13:18:36Z","git_url":"git://github.com/micbou/ycmd.git","ssh_url":"git@github.com:micbou/ycmd.git","clone_url":"https://github.com/micbou/ycmd.git","svn_url":"https://github.com/micbou/ycmd","homepage":null,"size":6689,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"windows"}},"base":{"label":"Valloric:master","ref":"master","sha":"a5015c4f8ce5e2df9a6d804f48d8c873f77df9da","user":{"login":"Valloric","id":919444,"avatar_url":"https://avatars.githubusercontent.com/u/919444?v=3","gravatar_id":"","url":"https://api.github.com/users/Valloric","html_url":"https://github.com/Valloric","followers_url":"https://api.github.com/users/Valloric/followers","following_url":"https://api.github.com/users/Valloric/following{/other_user}","gists_url":"https://api.github.com/users/Valloric/gists{/gist_id}","starred_url":"https://api.github.com/users/Valloric/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Valloric/subscriptions","organizations_url":"https://api.github.com/users/Valloric/orgs","repos_url":"https://api.github.com/users/Valloric/repos","events_url":"https://api.github.com/users/Valloric/events{/privacy}","received_events_url":"https://api.github.com/users/Valloric/received_events","type":"User","site_admin":false},"repo":{"id":19832415,"name":"ycmd","full_name":"Valloric/ycmd","owner":{"login":"Valloric","id":919444,"avatar_url":"https://avatars.githubusercontent.com/u/919444?v=3","gravatar_id":"","url":"https://api.github.com/users/Valloric","html_url":"https://github.com/Valloric","followers_url":"https://api.github.com/users/Valloric/followers","following_url":"https://api.github.com/users/Valloric/following{/other_user}","gists_url":"https://api.github.com/users/Valloric/gists{/gist_id}","starred_url":"https://api.github.com/users/Valloric/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Valloric/subscriptions","organizations_url":"https://api.github.com/users/Valloric/orgs","repos_url":"https://api.github.com/users/Valloric/repos","events_url":"https://api.github.com/users/Valloric/events{/privacy}","received_events_url":"https://api.github.com/users/Valloric/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Valloric/ycmd","description":"A code-completion & code-comprehension server","fork":false,"url":"https://api.github.com/repos/Valloric/ycmd","forks_url":"https://api.github.com/repos/Valloric/ycmd/forks","keys_url":"https://api.github.com/repos/Valloric/ycmd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Valloric/ycmd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Valloric/ycmd/teams","hooks_url":"https://api.github.com/repos/Valloric/ycmd/hooks","issue_events_url":"https://api.github.com/repos/Valloric/ycmd/issues/events{/number}","events_url":"https://api.github.com/repos/Valloric/ycmd/events","assignees_url":"https://api.github.com/repos/Valloric/ycmd/assignees{/user}","branches_url":"https://api.github.com/repos/Valloric/ycmd/branches{/branch}","tags_url":"https://api.github.com/repos/Valloric/ycmd/tags","blobs_url":"https://api.github.com/repos/Valloric/ycmd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Valloric/ycmd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Valloric/ycmd/git/refs{/sha}","trees_url":"https://api.github.com/repos/Valloric/ycmd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Valloric/ycmd/statuses/{sha}","languages_url":"https://api.github.com/repos/Valloric/ycmd/languages","stargazers_url":"https://api.github.com/repos/Valloric/ycmd/stargazers","contributors_url":"https://api.github.com/repos/Valloric/ycmd/contributors","subscribers_url":"https://api.github.com/repos/Valloric/ycmd/subscribers","subscription_url":"https://api.github.com/repos/Valloric/ycmd/subscription","commits_url":"https://api.github.com/repos/Valloric/ycmd/commits{/sha}","git_commits_url":"https://api.github.com/repos/Valloric/ycmd/git/commits{/sha}","comments_url":"https://api.github.com/repos/Valloric/ycmd/comments{/number}","issue_comment_url":"https://api.github.com/repos/Valloric/ycmd/issues/comments{/number}","contents_url":"https://api.github.com/repos/Valloric/ycmd/contents/{+path}","compare_url":"https://api.github.com/repos/Valloric/ycmd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Valloric/ycmd/merges","archive_url":"https://api.github.com/repos/Valloric/ycmd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Valloric/ycmd/downloads","issues_url":"https://api.github.com/repos/Valloric/ycmd/issues{/number}","pulls_url":"https://api.github.com/repos/Valloric/ycmd/pulls{/number}","milestones_url":"https://api.github.com/repos/Valloric/ycmd/milestones{/number}","notifications_url":"https://api.github.com/repos/Valloric/ycmd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Valloric/ycmd/labels{/name}","releases_url":"https://api.github.com/repos/Valloric/ycmd/releases{/id}","created_at":"2014-05-15T19:30:17Z","updated_at":"2015-06-05T15:54:21Z","pushed_at":"2015-06-06T14:20:14Z","git_url":"git://github.com/Valloric/ycmd.git","ssh_url":"git@github.com:Valloric/ycmd.git","clone_url":"https://github.com/Valloric/ycmd.git","svn_url":"https://github.com/Valloric/ycmd","homepage":null,"size":8579,"stargazers_count":294,"watchers_count":294,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":148,"mirror_url":null,"open_issues_count":20,"forks":148,"open_issues":20,"watchers":294,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Valloric/ycmd/pulls/156"},"html":{"href":"https://github.com/Valloric/ycmd/pull/156"},"issue":{"href":"https://api.github.com/repos/Valloric/ycmd/issues/156"},"comments":{"href":"https://api.github.com/repos/Valloric/ycmd/issues/156/comments"},"review_comments":{"href":"https://api.github.com/repos/Valloric/ycmd/pulls/156/comments"},"review_comment":{"href":"https://api.github.com/repos/Valloric/ycmd/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Valloric/ycmd/pulls/156/commits"},"statuses":{"href":"https://api.github.com/repos/Valloric/ycmd/statuses/402a7a27c0abc6713f4157e2e8195aca1419ee66"}}}}