{"action":"created","comment":{"url":"https://api.github.com/repos/Microsoft/vsts-tasks/pulls/comments/78154570","id":78154570,"diff_hunk":"@@ -245,13 +247,25 @@ function publishCodeChanges(): Q.Promise<string> {\n \n function executeVstest(testResultsDirectory: string, parallelRunSettingsFile: string, vsVersion: number, argsArray: string[]): Q.Promise<number> {\n     var defer = Q.defer<number>();\n-    var vsCommon = tl.getVariable(\"VS\" + vsVersion + \"0COMNTools\");\n-    if (!vsCommon) {\n-        tl.error(tl.loc('VstestNotFound', vsVersion));\n-        defer.resolve(1);\n-        return defer.promise;\n+    if (vstestLocationMethod == \"version\") {\n+        var vsCommon = tl.getVariable(\"VS\" + vsVersion + \"0COMNTools\");\n+        if (!vsCommon) {\n+            tl.error(tl.loc('VstestNotFound', vsVersion));\n+            defer.resolve(1);\n+            return defer.promise;\n+        }\n+        vstestLocation = path.join(vsCommon, \"..\\\\IDE\\\\CommonExtensions\\\\Microsoft\\\\TestWindow\\\\vstest.console.exe\");\n+    } else if (vstestLocationMethod == \"location\") {\n+        try {\n+            fs.accessSync(vstestLocation);","path":"Tasks/VsTest/vstest.ts","position":28,"original_position":28,"commit_id":"61468f8834c5a3c57fe149dfd4cc5f6ce5956752","original_commit_id":"61468f8834c5a3c57fe149dfd4cc5f6ce5956752","user":{"login":"nigurr","id":15208679,"avatar_url":"https://avatars.githubusercontent.com/u/15208679?v=3","gravatar_id":"","url":"https://api.github.com/users/nigurr","html_url":"https://github.com/nigurr","followers_url":"https://api.github.com/users/nigurr/followers","following_url":"https://api.github.com/users/nigurr/following{/other_user}","gists_url":"https://api.github.com/users/nigurr/gists{/gist_id}","starred_url":"https://api.github.com/users/nigurr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nigurr/subscriptions","organizations_url":"https://api.github.com/users/nigurr/orgs","repos_url":"https://api.github.com/users/nigurr/repos","events_url":"https://api.github.com/users/nigurr/events{/privacy}","received_events_url":"https://api.github.com/users/nigurr/received_events","type":"User","site_admin":false},"body":"actually. you should use `tl.exists()` there is already lib function.","created_at":"2016-09-09T09:45:30Z","updated_at":"2016-09-09T09:45:30Z","html_url":"https://github.com/Microsoft/vsts-tasks/pull/2465#discussion_r78154570","pull_request_url":"https://api.github.com/repos/Microsoft/vsts-tasks/pulls/2465","_links":{"self":{"href":"https://api.github.com/repos/Microsoft/vsts-tasks/pulls/comments/78154570"},"html":{"href":"https://github.com/Microsoft/vsts-tasks/pull/2465#discussion_r78154570"},"pull_request":{"href":"https://api.github.com/repos/Microsoft/vsts-tasks/pulls/2465"}}},"pull_request":{"url":"https://api.github.com/repos/Microsoft/vsts-tasks/pulls/2465","id":84617521,"html_url":"https://github.com/Microsoft/vsts-tasks/pull/2465","diff_url":"https://github.com/Microsoft/vsts-tasks/pull/2465.diff","patch_url":"https://github.com/Microsoft/vsts-tasks/pull/2465.patch","issue_url":"https://api.github.com/repos/Microsoft/vsts-tasks/issues/2465","number":2465,"state":"open","locked":false,"title":"Users/prmutn/specifylocationnode","user":{"login":"preetsaimutneja","id":14777648,"avatar_url":"https://avatars.githubusercontent.com/u/14777648?v=3","gravatar_id":"","url":"https://api.github.com/users/preetsaimutneja","html_url":"https://github.com/preetsaimutneja","followers_url":"https://api.github.com/users/preetsaimutneja/followers","following_url":"https://api.github.com/users/preetsaimutneja/following{/other_user}","gists_url":"https://api.github.com/users/preetsaimutneja/gists{/gist_id}","starred_url":"https://api.github.com/users/preetsaimutneja/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/preetsaimutneja/subscriptions","organizations_url":"https://api.github.com/users/preetsaimutneja/orgs","repos_url":"https://api.github.com/users/preetsaimutneja/repos","events_url":"https://api.github.com/users/preetsaimutneja/events{/privacy}","received_events_url":"https://api.github.com/users/preetsaimutneja/received_events","type":"User","site_admin":false},"body":"Allow users to specify vstest.console.exe path.\r\n\r\n1. Pending unit tests\r\n2. Did manual testing","created_at":"2016-09-09T09:10:46Z","updated_at":"2016-09-09T09:45:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d6299eb65f066db8e636f9607bfdcac2984e1629","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Microsoft/vsts-tasks/pulls/2465/commits","review_comments_url":"https://api.github.com/repos/Microsoft/vsts-tasks/pulls/2465/comments","review_comment_url":"https://api.github.com/repos/Microsoft/vsts-tasks/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Microsoft/vsts-tasks/issues/2465/comments","statuses_url":"https://api.github.com/repos/Microsoft/vsts-tasks/statuses/61468f8834c5a3c57fe149dfd4cc5f6ce5956752","head":{"label":"Microsoft:users/prmutn/specifylocationnode","ref":"users/prmutn/specifylocationnode","sha":"61468f8834c5a3c57fe149dfd4cc5f6ce5956752","user":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"repo":{"id":27631673,"name":"vsts-tasks","full_name":"Microsoft/vsts-tasks","owner":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Microsoft/vsts-tasks","description":"Build and Release Tasks for Visual Studio Team Services and Team Foundation Server","fork":false,"url":"https://api.github.com/repos/Microsoft/vsts-tasks","forks_url":"https://api.github.com/repos/Microsoft/vsts-tasks/forks","keys_url":"https://api.github.com/repos/Microsoft/vsts-tasks/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Microsoft/vsts-tasks/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Microsoft/vsts-tasks/teams","hooks_url":"https://api.github.com/repos/Microsoft/vsts-tasks/hooks","issue_events_url":"https://api.github.com/repos/Microsoft/vsts-tasks/issues/events{/number}","events_url":"https://api.github.com/repos/Microsoft/vsts-tasks/events","assignees_url":"https://api.github.com/repos/Microsoft/vsts-tasks/assignees{/user}","branches_url":"https://api.github.com/repos/Microsoft/vsts-tasks/branches{/branch}","tags_url":"https://api.github.com/repos/Microsoft/vsts-tasks/tags","blobs_url":"https://api.github.com/repos/Microsoft/vsts-tasks/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Microsoft/vsts-tasks/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Microsoft/vsts-tasks/git/refs{/sha}","trees_url":"https://api.github.com/repos/Microsoft/vsts-tasks/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Microsoft/vsts-tasks/statuses/{sha}","languages_url":"https://api.github.com/repos/Microsoft/vsts-tasks/languages","stargazers_url":"https://api.github.com/repos/Microsoft/vsts-tasks/stargazers","contributors_url":"https://api.github.com/repos/Microsoft/vsts-tasks/contributors","subscribers_url":"https://api.github.com/repos/Microsoft/vsts-tasks/subscribers","subscription_url":"https://api.github.com/repos/Microsoft/vsts-tasks/subscription","commits_url":"https://api.github.com/repos/Microsoft/vsts-tasks/commits{/sha}","git_commits_url":"https://api.github.com/repos/Microsoft/vsts-tasks/git/commits{/sha}","comments_url":"https://api.github.com/repos/Microsoft/vsts-tasks/comments{/number}","issue_comment_url":"https://api.github.com/repos/Microsoft/vsts-tasks/issues/comments{/number}","contents_url":"https://api.github.com/repos/Microsoft/vsts-tasks/contents/{+path}","compare_url":"https://api.github.com/repos/Microsoft/vsts-tasks/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Microsoft/vsts-tasks/merges","archive_url":"https://api.github.com/repos/Microsoft/vsts-tasks/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Microsoft/vsts-tasks/downloads","issues_url":"https://api.github.com/repos/Microsoft/vsts-tasks/issues{/number}","pulls_url":"https://api.github.com/repos/Microsoft/vsts-tasks/pulls{/number}","milestones_url":"https://api.github.com/repos/Microsoft/vsts-tasks/milestones{/number}","notifications_url":"https://api.github.com/repos/Microsoft/vsts-tasks/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Microsoft/vsts-tasks/labels{/name}","releases_url":"https://api.github.com/repos/Microsoft/vsts-tasks/releases{/id}","deployments_url":"https://api.github.com/repos/Microsoft/vsts-tasks/deployments","created_at":"2014-12-06T11:11:46Z","updated_at":"2016-09-09T08:58:28Z","pushed_at":"2016-09-09T09:10:46Z","git_url":"git://github.com/Microsoft/vsts-tasks.git","ssh_url":"git@github.com:Microsoft/vsts-tasks.git","clone_url":"https://github.com/Microsoft/vsts-tasks.git","svn_url":"https://github.com/Microsoft/vsts-tasks","homepage":"https://aka.ms/tfbuild","size":19629,"stargazers_count":401,"watchers_count":401,"language":"TypeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":357,"mirror_url":null,"open_issues_count":110,"forks":357,"open_issues":110,"watchers":401,"default_branch":"master"}},"base":{"label":"Microsoft:master","ref":"master","sha":"c5f8281445f088cd0a4e87b1bd62c5412cf837fb","user":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"repo":{"id":27631673,"name":"vsts-tasks","full_name":"Microsoft/vsts-tasks","owner":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Microsoft/vsts-tasks","description":"Build and Release Tasks for Visual Studio Team Services and Team Foundation Server","fork":false,"url":"https://api.github.com/repos/Microsoft/vsts-tasks","forks_url":"https://api.github.com/repos/Microsoft/vsts-tasks/forks","keys_url":"https://api.github.com/repos/Microsoft/vsts-tasks/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Microsoft/vsts-tasks/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Microsoft/vsts-tasks/teams","hooks_url":"https://api.github.com/repos/Microsoft/vsts-tasks/hooks","issue_events_url":"https://api.github.com/repos/Microsoft/vsts-tasks/issues/events{/number}","events_url":"https://api.github.com/repos/Microsoft/vsts-tasks/events","assignees_url":"https://api.github.com/repos/Microsoft/vsts-tasks/assignees{/user}","branches_url":"https://api.github.com/repos/Microsoft/vsts-tasks/branches{/branch}","tags_url":"https://api.github.com/repos/Microsoft/vsts-tasks/tags","blobs_url":"https://api.github.com/repos/Microsoft/vsts-tasks/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Microsoft/vsts-tasks/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Microsoft/vsts-tasks/git/refs{/sha}","trees_url":"https://api.github.com/repos/Microsoft/vsts-tasks/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Microsoft/vsts-tasks/statuses/{sha}","languages_url":"https://api.github.com/repos/Microsoft/vsts-tasks/languages","stargazers_url":"https://api.github.com/repos/Microsoft/vsts-tasks/stargazers","contributors_url":"https://api.github.com/repos/Microsoft/vsts-tasks/contributors","subscribers_url":"https://api.github.com/repos/Microsoft/vsts-tasks/subscribers","subscription_url":"https://api.github.com/repos/Microsoft/vsts-tasks/subscription","commits_url":"https://api.github.com/repos/Microsoft/vsts-tasks/commits{/sha}","git_commits_url":"https://api.github.com/repos/Microsoft/vsts-tasks/git/commits{/sha}","comments_url":"https://api.github.com/repos/Microsoft/vsts-tasks/comments{/number}","issue_comment_url":"https://api.github.com/repos/Microsoft/vsts-tasks/issues/comments{/number}","contents_url":"https://api.github.com/repos/Microsoft/vsts-tasks/contents/{+path}","compare_url":"https://api.github.com/repos/Microsoft/vsts-tasks/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Microsoft/vsts-tasks/merges","archive_url":"https://api.github.com/repos/Microsoft/vsts-tasks/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Microsoft/vsts-tasks/downloads","issues_url":"https://api.github.com/repos/Microsoft/vsts-tasks/issues{/number}","pulls_url":"https://api.github.com/repos/Microsoft/vsts-tasks/pulls{/number}","milestones_url":"https://api.github.com/repos/Microsoft/vsts-tasks/milestones{/number}","notifications_url":"https://api.github.com/repos/Microsoft/vsts-tasks/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Microsoft/vsts-tasks/labels{/name}","releases_url":"https://api.github.com/repos/Microsoft/vsts-tasks/releases{/id}","deployments_url":"https://api.github.com/repos/Microsoft/vsts-tasks/deployments","created_at":"2014-12-06T11:11:46Z","updated_at":"2016-09-09T08:58:28Z","pushed_at":"2016-09-09T09:10:46Z","git_url":"git://github.com/Microsoft/vsts-tasks.git","ssh_url":"git@github.com:Microsoft/vsts-tasks.git","clone_url":"https://github.com/Microsoft/vsts-tasks.git","svn_url":"https://github.com/Microsoft/vsts-tasks","homepage":"https://aka.ms/tfbuild","size":19629,"stargazers_count":401,"watchers_count":401,"language":"TypeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":357,"mirror_url":null,"open_issues_count":110,"forks":357,"open_issues":110,"watchers":401,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Microsoft/vsts-tasks/pulls/2465"},"html":{"href":"https://github.com/Microsoft/vsts-tasks/pull/2465"},"issue":{"href":"https://api.github.com/repos/Microsoft/vsts-tasks/issues/2465"},"comments":{"href":"https://api.github.com/repos/Microsoft/vsts-tasks/issues/2465/comments"},"review_comments":{"href":"https://api.github.com/repos/Microsoft/vsts-tasks/pulls/2465/comments"},"review_comment":{"href":"https://api.github.com/repos/Microsoft/vsts-tasks/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Microsoft/vsts-tasks/pulls/2465/commits"},"statuses":{"href":"https://api.github.com/repos/Microsoft/vsts-tasks/statuses/61468f8834c5a3c57fe149dfd4cc5f6ce5956752"}}}}
{"actor":{"display_login":"nigurr"}}