{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/cli/issues/8716","repository_url":"https://api.github.com/repos/dotnet/cli","labels_url":"https://api.github.com/repos/dotnet/cli/issues/8716/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/cli/issues/8716/comments","events_url":"https://api.github.com/repos/dotnet/cli/issues/8716/events","html_url":"https://github.com/dotnet/cli/pull/8716","id":301668378,"number":8716,"title":"tool-path option -- \"Session tool\"","user":{"login":"wli3","id":6993335,"avatar_url":"https://avatars1.githubusercontent.com/u/6993335?v=4","gravatar_id":"","url":"https://api.github.com/users/wli3","html_url":"https://github.com/wli3","followers_url":"https://api.github.com/users/wli3/followers","following_url":"https://api.github.com/users/wli3/following{/other_user}","gists_url":"https://api.github.com/users/wli3/gists{/gist_id}","starred_url":"https://api.github.com/users/wli3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wli3/subscriptions","organizations_url":"https://api.github.com/users/wli3/orgs","repos_url":"https://api.github.com/users/wli3/repos","events_url":"https://api.github.com/users/wli3/events{/privacy}","received_events_url":"https://api.github.com/users/wli3/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-03-02T06:40:20Z","updated_at":"2018-03-06T05:43:36Z","closed_at":null,"author_association":"COLLABORATOR","pull_request":{"url":"https://api.github.com/repos/dotnet/cli/pulls/8716","html_url":"https://github.com/dotnet/cli/pull/8716","diff_url":"https://github.com/dotnet/cli/pull/8716.diff","patch_url":"https://github.com/dotnet/cli/pull/8716.patch"},"body":"Previous discussion https://github.com/dotnet/cli/pull/8670\r\n\r\nFrom the **beginning design, shim and packageInstaller take _package location_ from constructor** and don't have assumption anymore. From previous discussion, `tool-path `will simply change global location to the one user want, and everything else is the same.\r\n\r\nHowever, this \"override\" need to happen during the call, that means _InstallToolCommand_ will create different shim and packageInstaller object according to the tool-path during the call instead of constructor DI.\r\n\r\nnew a shim repo or a packageInstaller during the call will break the testability. So I added factories.\r\n\r\nAs for tests - it is testing DI at this point. I think a manual test should be enough, we don't have automate tests for package are stored in `.dotnet/tools` either.\r\n\r\n-------------\r\n\r\nIncludes global package location change. And block of leading dot as command name\r\n\r\n------------\r\n\r\nUser's CI sample\r\n\r\n```bat\r\nSET toolpath=c:\\work\\cli\\bin\\toolpath%RANDOM%\r\nSET PATH=%PATH%;%toolpath%\r\ndotnet install tool dotnet-sql-cache --tool-path %toolpath% --version 2.1.0-preview1-28181\r\n%toolpath%\\dotnet-sql-cache -v\r\n```"},"comment":{"url":"https://api.github.com/repos/dotnet/cli/issues/comments/370670433","html_url":"https://github.com/dotnet/cli/pull/8716#issuecomment-370670433","issue_url":"https://api.github.com/repos/dotnet/cli/issues/8716","id":370670433,"user":{"login":"wli3","id":6993335,"avatar_url":"https://avatars1.githubusercontent.com/u/6993335?v=4","gravatar_id":"","url":"https://api.github.com/users/wli3","html_url":"https://github.com/wli3","followers_url":"https://api.github.com/users/wli3/followers","following_url":"https://api.github.com/users/wli3/following{/other_user}","gists_url":"https://api.github.com/users/wli3/gists{/gist_id}","starred_url":"https://api.github.com/users/wli3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wli3/subscriptions","organizations_url":"https://api.github.com/users/wli3/orgs","repos_url":"https://api.github.com/users/wli3/repos","events_url":"https://api.github.com/users/wli3/events{/privacy}","received_events_url":"https://api.github.com/users/wli3/received_events","type":"User","site_admin":false},"created_at":"2018-03-06T05:43:36Z","updated_at":"2018-03-06T05:43:36Z","author_association":"COLLABORATOR","body":"This week we have MVP summit. I created an issue for the user facing strings. So we don't have to block on this https://github.com/dotnet/cli/issues/8728"}}
{"actor":{"display_login":"wli3"}}