{"action":"created","comment":{"url":"https://api.github.com/repos/aspnet/Hosting/pulls/comments/42283085","id":42283085,"diff_hunk":"@@ -99,16 +99,31 @@ protected string DnxCommandName\n \n         protected string PopulateChosenRuntimeInformation()\n         {\n-            // ex: runtimes/dnx-coreclr-win-x64.1.0.0-rc1-15844/bin\n-            var currentRuntimeBinPath = Path.GetDirectoryName(Process.GetCurrentProcess().MainModule.FileName);\n+            string currentRuntimeBinPath = string.Empty;\n+            if (TestPlatformHelper.IsMac && DeploymentParameters.RuntimeFlavor == RuntimeFlavor.CoreClr)\n+            {\n+                var path = Environment.GetEnvironmentVariable(\"PATH\");\n+                currentRuntimeBinPath = path.Split(new char[] { ':' }, StringSplitOptions.RemoveEmptyEntries).\n+                    Where(c => c.Contains(\"dnx-coreclr-darwin\") || c.Contains(\"dnx-mono\")).FirstOrDefault();\n+\n+                if (string.IsNullOrWhiteSpace(currentRuntimeBinPath))\n+                {\n+                    throw new Exception(\"Runtime not detected on the machine.\");\n+                }\n+            }\n+            else\n+            {\n+                // ex: runtimes/dnx-coreclr-win-x64.1.0.0-rc1-15844/bin\n+                currentRuntimeBinPath = Path.GetDirectoryName(Process.GetCurrentProcess().MainModule.FileName);","path":"src/Microsoft.AspNet.Server.Testing/Deployers/ApplicationDeployer.cs","position":21,"original_position":21,"commit_id":"2a65502a204b70916e1d5f51bc543da0c944e9d7","original_commit_id":"2a65502a204b70916e1d5f51bc543da0c944e9d7","user":{"login":"kichalla","id":6559784,"avatar_url":"https://avatars.githubusercontent.com/u/6559784?v=3","gravatar_id":"","url":"https://api.github.com/users/kichalla","html_url":"https://github.com/kichalla","followers_url":"https://api.github.com/users/kichalla/followers","following_url":"https://api.github.com/users/kichalla/following{/other_user}","gists_url":"https://api.github.com/users/kichalla/gists{/gist_id}","starred_url":"https://api.github.com/users/kichalla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kichalla/subscriptions","organizations_url":"https://api.github.com/users/kichalla/orgs","repos_url":"https://api.github.com/users/kichalla/repos","events_url":"https://api.github.com/users/kichalla/events{/privacy}","received_events_url":"https://api.github.com/users/kichalla/received_events","type":"User","site_admin":false},"body":"You need not have this condition any more as we can have one way of getting current runtime bin path and it could be used both on mono and regular deployers...\r\n```\r\nprotected string getcurrentruntimepath()\r\n{\r\n            var path = Environment.GetEnvironmentVariable(\"PATH\");\r\n            var runtimeBin = path.Split(new char[] { ':' }, StringSplitOptions.RemoveEmptyEntries).\r\n                Where(c => c.Contains(\"dnx-mono\") || c.Contains(\"dnx-clr\") || c.Contains(\"dnx-coreclr\")).FirstOrDefault();\r\n\r\n            if (string.IsNullOrWhiteSpace(runtimeBin))\r\n            {\r\n                throw new Exception(\"Runtime not detected on the machine.\");\r\n            }\r\n\r\n     return path;\r\n}\r\n```","created_at":"2015-10-16T19:53:12Z","updated_at":"2015-10-16T19:53:12Z","html_url":"https://github.com/aspnet/Hosting/pull/413#discussion_r42283085","pull_request_url":"https://api.github.com/repos/aspnet/Hosting/pulls/413","_links":{"self":{"href":"https://api.github.com/repos/aspnet/Hosting/pulls/comments/42283085"},"html":{"href":"https://github.com/aspnet/Hosting/pull/413#discussion_r42283085"},"pull_request":{"href":"https://api.github.com/repos/aspnet/Hosting/pulls/413"}}},"pull_request":{"url":"https://api.github.com/repos/aspnet/Hosting/pulls/413","id":47936897,"html_url":"https://github.com/aspnet/Hosting/pull/413","diff_url":"https://github.com/aspnet/Hosting/pull/413.diff","patch_url":"https://github.com/aspnet/Hosting/pull/413.patch","issue_url":"https://api.github.com/repos/aspnet/Hosting/issues/413","number":413,"state":"open","locked":false,"title":"Add different logic to get runtime for coreclr on mac","user":{"login":"kirthik","id":1267650,"avatar_url":"https://avatars.githubusercontent.com/u/1267650?v=3","gravatar_id":"","url":"https://api.github.com/users/kirthik","html_url":"https://github.com/kirthik","followers_url":"https://api.github.com/users/kirthik/followers","following_url":"https://api.github.com/users/kirthik/following{/other_user}","gists_url":"https://api.github.com/users/kirthik/gists{/gist_id}","starred_url":"https://api.github.com/users/kirthik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kirthik/subscriptions","organizations_url":"https://api.github.com/users/kirthik/orgs","repos_url":"https://api.github.com/users/kirthik/repos","events_url":"https://api.github.com/users/kirthik/events{/privacy}","received_events_url":"https://api.github.com/users/kirthik/received_events","type":"User","site_admin":false},"body":"cc @kichalla, @Tratcher ","created_at":"2015-10-16T17:20:37Z","updated_at":"2015-10-16T19:53:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b13db795077a896915137c038941a5293e25801d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/aspnet/Hosting/pulls/413/commits","review_comments_url":"https://api.github.com/repos/aspnet/Hosting/pulls/413/comments","review_comment_url":"https://api.github.com/repos/aspnet/Hosting/pulls/comments{/number}","comments_url":"https://api.github.com/repos/aspnet/Hosting/issues/413/comments","statuses_url":"https://api.github.com/repos/aspnet/Hosting/statuses/2a65502a204b70916e1d5f51bc543da0c944e9d7","head":{"label":"aspnet:fixmac","ref":"fixmac","sha":"2a65502a204b70916e1d5f51bc543da0c944e9d7","user":{"login":"aspnet","id":6476660,"avatar_url":"https://avatars.githubusercontent.com/u/6476660?v=3","gravatar_id":"","url":"https://api.github.com/users/aspnet","html_url":"https://github.com/aspnet","followers_url":"https://api.github.com/users/aspnet/followers","following_url":"https://api.github.com/users/aspnet/following{/other_user}","gists_url":"https://api.github.com/users/aspnet/gists{/gist_id}","starred_url":"https://api.github.com/users/aspnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aspnet/subscriptions","organizations_url":"https://api.github.com/users/aspnet/orgs","repos_url":"https://api.github.com/users/aspnet/repos","events_url":"https://api.github.com/users/aspnet/events{/privacy}","received_events_url":"https://api.github.com/users/aspnet/received_events","type":"Organization","site_admin":false},"repo":{"id":16630141,"name":"Hosting","full_name":"aspnet/Hosting","owner":{"login":"aspnet","id":6476660,"avatar_url":"https://avatars.githubusercontent.com/u/6476660?v=3","gravatar_id":"","url":"https://api.github.com/users/aspnet","html_url":"https://github.com/aspnet","followers_url":"https://api.github.com/users/aspnet/followers","following_url":"https://api.github.com/users/aspnet/following{/other_user}","gists_url":"https://api.github.com/users/aspnet/gists{/gist_id}","starred_url":"https://api.github.com/users/aspnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aspnet/subscriptions","organizations_url":"https://api.github.com/users/aspnet/orgs","repos_url":"https://api.github.com/users/aspnet/repos","events_url":"https://api.github.com/users/aspnet/events{/privacy}","received_events_url":"https://api.github.com/users/aspnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/aspnet/Hosting","description":"Code for hosting and starting up an ASP.NET application.","fork":false,"url":"https://api.github.com/repos/aspnet/Hosting","forks_url":"https://api.github.com/repos/aspnet/Hosting/forks","keys_url":"https://api.github.com/repos/aspnet/Hosting/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aspnet/Hosting/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aspnet/Hosting/teams","hooks_url":"https://api.github.com/repos/aspnet/Hosting/hooks","issue_events_url":"https://api.github.com/repos/aspnet/Hosting/issues/events{/number}","events_url":"https://api.github.com/repos/aspnet/Hosting/events","assignees_url":"https://api.github.com/repos/aspnet/Hosting/assignees{/user}","branches_url":"https://api.github.com/repos/aspnet/Hosting/branches{/branch}","tags_url":"https://api.github.com/repos/aspnet/Hosting/tags","blobs_url":"https://api.github.com/repos/aspnet/Hosting/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aspnet/Hosting/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aspnet/Hosting/git/refs{/sha}","trees_url":"https://api.github.com/repos/aspnet/Hosting/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aspnet/Hosting/statuses/{sha}","languages_url":"https://api.github.com/repos/aspnet/Hosting/languages","stargazers_url":"https://api.github.com/repos/aspnet/Hosting/stargazers","contributors_url":"https://api.github.com/repos/aspnet/Hosting/contributors","subscribers_url":"https://api.github.com/repos/aspnet/Hosting/subscribers","subscription_url":"https://api.github.com/repos/aspnet/Hosting/subscription","commits_url":"https://api.github.com/repos/aspnet/Hosting/commits{/sha}","git_commits_url":"https://api.github.com/repos/aspnet/Hosting/git/commits{/sha}","comments_url":"https://api.github.com/repos/aspnet/Hosting/comments{/number}","issue_comment_url":"https://api.github.com/repos/aspnet/Hosting/issues/comments{/number}","contents_url":"https://api.github.com/repos/aspnet/Hosting/contents/{+path}","compare_url":"https://api.github.com/repos/aspnet/Hosting/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aspnet/Hosting/merges","archive_url":"https://api.github.com/repos/aspnet/Hosting/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aspnet/Hosting/downloads","issues_url":"https://api.github.com/repos/aspnet/Hosting/issues{/number}","pulls_url":"https://api.github.com/repos/aspnet/Hosting/pulls{/number}","milestones_url":"https://api.github.com/repos/aspnet/Hosting/milestones{/number}","notifications_url":"https://api.github.com/repos/aspnet/Hosting/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aspnet/Hosting/labels{/name}","releases_url":"https://api.github.com/repos/aspnet/Hosting/releases{/id}","created_at":"2014-02-07T22:58:12Z","updated_at":"2015-10-13T06:24:21Z","pushed_at":"2015-10-16T18:54:13Z","git_url":"git://github.com/aspnet/Hosting.git","ssh_url":"git@github.com:aspnet/Hosting.git","clone_url":"https://github.com/aspnet/Hosting.git","svn_url":"https://github.com/aspnet/Hosting","homepage":"","size":4051,"stargazers_count":135,"watchers_count":135,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":75,"mirror_url":null,"open_issues_count":44,"forks":75,"open_issues":44,"watchers":135,"default_branch":"dev"}},"base":{"label":"aspnet:dev","ref":"dev","sha":"374526b2704f6a6b1dbb6587b704efd29109ab30","user":{"login":"aspnet","id":6476660,"avatar_url":"https://avatars.githubusercontent.com/u/6476660?v=3","gravatar_id":"","url":"https://api.github.com/users/aspnet","html_url":"https://github.com/aspnet","followers_url":"https://api.github.com/users/aspnet/followers","following_url":"https://api.github.com/users/aspnet/following{/other_user}","gists_url":"https://api.github.com/users/aspnet/gists{/gist_id}","starred_url":"https://api.github.com/users/aspnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aspnet/subscriptions","organizations_url":"https://api.github.com/users/aspnet/orgs","repos_url":"https://api.github.com/users/aspnet/repos","events_url":"https://api.github.com/users/aspnet/events{/privacy}","received_events_url":"https://api.github.com/users/aspnet/received_events","type":"Organization","site_admin":false},"repo":{"id":16630141,"name":"Hosting","full_name":"aspnet/Hosting","owner":{"login":"aspnet","id":6476660,"avatar_url":"https://avatars.githubusercontent.com/u/6476660?v=3","gravatar_id":"","url":"https://api.github.com/users/aspnet","html_url":"https://github.com/aspnet","followers_url":"https://api.github.com/users/aspnet/followers","following_url":"https://api.github.com/users/aspnet/following{/other_user}","gists_url":"https://api.github.com/users/aspnet/gists{/gist_id}","starred_url":"https://api.github.com/users/aspnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aspnet/subscriptions","organizations_url":"https://api.github.com/users/aspnet/orgs","repos_url":"https://api.github.com/users/aspnet/repos","events_url":"https://api.github.com/users/aspnet/events{/privacy}","received_events_url":"https://api.github.com/users/aspnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/aspnet/Hosting","description":"Code for hosting and starting up an ASP.NET application.","fork":false,"url":"https://api.github.com/repos/aspnet/Hosting","forks_url":"https://api.github.com/repos/aspnet/Hosting/forks","keys_url":"https://api.github.com/repos/aspnet/Hosting/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aspnet/Hosting/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aspnet/Hosting/teams","hooks_url":"https://api.github.com/repos/aspnet/Hosting/hooks","issue_events_url":"https://api.github.com/repos/aspnet/Hosting/issues/events{/number}","events_url":"https://api.github.com/repos/aspnet/Hosting/events","assignees_url":"https://api.github.com/repos/aspnet/Hosting/assignees{/user}","branches_url":"https://api.github.com/repos/aspnet/Hosting/branches{/branch}","tags_url":"https://api.github.com/repos/aspnet/Hosting/tags","blobs_url":"https://api.github.com/repos/aspnet/Hosting/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aspnet/Hosting/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aspnet/Hosting/git/refs{/sha}","trees_url":"https://api.github.com/repos/aspnet/Hosting/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aspnet/Hosting/statuses/{sha}","languages_url":"https://api.github.com/repos/aspnet/Hosting/languages","stargazers_url":"https://api.github.com/repos/aspnet/Hosting/stargazers","contributors_url":"https://api.github.com/repos/aspnet/Hosting/contributors","subscribers_url":"https://api.github.com/repos/aspnet/Hosting/subscribers","subscription_url":"https://api.github.com/repos/aspnet/Hosting/subscription","commits_url":"https://api.github.com/repos/aspnet/Hosting/commits{/sha}","git_commits_url":"https://api.github.com/repos/aspnet/Hosting/git/commits{/sha}","comments_url":"https://api.github.com/repos/aspnet/Hosting/comments{/number}","issue_comment_url":"https://api.github.com/repos/aspnet/Hosting/issues/comments{/number}","contents_url":"https://api.github.com/repos/aspnet/Hosting/contents/{+path}","compare_url":"https://api.github.com/repos/aspnet/Hosting/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aspnet/Hosting/merges","archive_url":"https://api.github.com/repos/aspnet/Hosting/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aspnet/Hosting/downloads","issues_url":"https://api.github.com/repos/aspnet/Hosting/issues{/number}","pulls_url":"https://api.github.com/repos/aspnet/Hosting/pulls{/number}","milestones_url":"https://api.github.com/repos/aspnet/Hosting/milestones{/number}","notifications_url":"https://api.github.com/repos/aspnet/Hosting/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aspnet/Hosting/labels{/name}","releases_url":"https://api.github.com/repos/aspnet/Hosting/releases{/id}","created_at":"2014-02-07T22:58:12Z","updated_at":"2015-10-13T06:24:21Z","pushed_at":"2015-10-16T18:54:13Z","git_url":"git://github.com/aspnet/Hosting.git","ssh_url":"git@github.com:aspnet/Hosting.git","clone_url":"https://github.com/aspnet/Hosting.git","svn_url":"https://github.com/aspnet/Hosting","homepage":"","size":4051,"stargazers_count":135,"watchers_count":135,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":75,"mirror_url":null,"open_issues_count":44,"forks":75,"open_issues":44,"watchers":135,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/aspnet/Hosting/pulls/413"},"html":{"href":"https://github.com/aspnet/Hosting/pull/413"},"issue":{"href":"https://api.github.com/repos/aspnet/Hosting/issues/413"},"comments":{"href":"https://api.github.com/repos/aspnet/Hosting/issues/413/comments"},"review_comments":{"href":"https://api.github.com/repos/aspnet/Hosting/pulls/413/comments"},"review_comment":{"href":"https://api.github.com/repos/aspnet/Hosting/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/aspnet/Hosting/pulls/413/commits"},"statuses":{"href":"https://api.github.com/repos/aspnet/Hosting/statuses/2a65502a204b70916e1d5f51bc543da0c944e9d7"}}}}