{"action":"closed","number":9327,"pull_request":{"url":"https://api.github.com/repos/dotnet/cli/pulls/9327","id":189504312,"html_url":"https://github.com/dotnet/cli/pull/9327","diff_url":"https://github.com/dotnet/cli/pull/9327.diff","patch_url":"https://github.com/dotnet/cli/pull/9327.patch","issue_url":"https://api.github.com/repos/dotnet/cli/issues/9327","number":9327,"state":"closed","locked":false,"title":"Fix crash when user home directory cannot be determined. ","user":{"login":"peterhuene","id":509666,"avatar_url":"https://avatars3.githubusercontent.com/u/509666?v=4","gravatar_id":"","url":"https://api.github.com/users/peterhuene","html_url":"https://github.com/peterhuene","followers_url":"https://api.github.com/users/peterhuene/followers","following_url":"https://api.github.com/users/peterhuene/following{/other_user}","gists_url":"https://api.github.com/users/peterhuene/gists{/gist_id}","starred_url":"https://api.github.com/users/peterhuene/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peterhuene/subscriptions","organizations_url":"https://api.github.com/users/peterhuene/orgs","repos_url":"https://api.github.com/users/peterhuene/repos","events_url":"https://api.github.com/users/peterhuene/events{/privacy}","received_events_url":"https://api.github.com/users/peterhuene/received_events","type":"User","site_admin":false},"body":"Currently, dotnet will crash with an `ArgumentNullException` if `USERPROFILE`\r\n(Windows) or `HOME` (macOS and Linux) is not set in the environment.  This\r\nis because there is a missing null check after retrieving the environment\r\nvariable's value.  Additionally, if either variable is set to an empty string,\r\na `.dotnet` directory is created in the current directory where dotnet is being\r\nrun.\r\n\r\nThis commit fixes this by printing a graceful error informing the user the home\r\ndirectory could not be determined and to set `DOTNET_CLI_HOME` to the directory\r\nto use.  This variable will be respected before `USERPROFILE` or `HOME`. It is\r\nlikely that CI environments where `HOME` is not set can use `DOTNET_CLI_HOME`\r\nto specify a local temporary location; by using this variable rather than\r\nsetting `HOME`, it is guaranteed to only affect dotnet.\r\n\r\nIt was discussed that we should perhaps fallback to some temporary location if\r\nthe home directory could not be determined, but NuGet currently requires `HOME`\r\nto be set to work.  Because of this, it was decided that we should just handle\r\nthis case gracefully and provide a way for users to override the home directory\r\nwithout relying on `USERPROFILE`/`HOME` entirely.\r\n\r\nCloses #8053.","created_at":"2018-05-21T22:29:34Z","updated_at":"2018-05-23T21:45:33Z","closed_at":"2018-05-23T21:45:33Z","merged_at":"2018-05-23T21:45:33Z","merge_commit_sha":"81308488a74e4d71a60e9ae4c1d6f34170f4fb37","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":483769480,"url":"https://api.github.com/repos/dotnet/cli/labels/Approved%20to%20merge","name":"Approved to merge","color":"fbca04","default":false}],"milestone":{"url":"https://api.github.com/repos/dotnet/cli/milestones/20","html_url":"https://github.com/dotnet/cli/milestone/20","labels_url":"https://api.github.com/repos/dotnet/cli/milestones/20/labels","id":3181433,"number":20,"title":"2.1.4xx","description":"","creator":{"login":"livarcocc","id":367554,"avatar_url":"https://avatars3.githubusercontent.com/u/367554?v=4","gravatar_id":"","url":"https://api.github.com/users/livarcocc","html_url":"https://github.com/livarcocc","followers_url":"https://api.github.com/users/livarcocc/followers","following_url":"https://api.github.com/users/livarcocc/following{/other_user}","gists_url":"https://api.github.com/users/livarcocc/gists{/gist_id}","starred_url":"https://api.github.com/users/livarcocc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/livarcocc/subscriptions","organizations_url":"https://api.github.com/users/livarcocc/orgs","repos_url":"https://api.github.com/users/livarcocc/repos","events_url":"https://api.github.com/users/livarcocc/events{/privacy}","received_events_url":"https://api.github.com/users/livarcocc/received_events","type":"User","site_admin":false},"open_issues":68,"closed_issues":38,"state":"open","created_at":"2018-03-12T18:33:33Z","updated_at":"2018-05-23T21:45:33Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/dotnet/cli/pulls/9327/commits","review_comments_url":"https://api.github.com/repos/dotnet/cli/pulls/9327/comments","review_comment_url":"https://api.github.com/repos/dotnet/cli/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotnet/cli/issues/9327/comments","statuses_url":"https://api.github.com/repos/dotnet/cli/statuses/b1f8eb1d8d2eeb470163da33d46bd99f0ab0fdc6","head":{"label":"peterhuene:fix-home","ref":"fix-home","sha":"b1f8eb1d8d2eeb470163da33d46bd99f0ab0fdc6","user":{"login":"peterhuene","id":509666,"avatar_url":"https://avatars3.githubusercontent.com/u/509666?v=4","gravatar_id":"","url":"https://api.github.com/users/peterhuene","html_url":"https://github.com/peterhuene","followers_url":"https://api.github.com/users/peterhuene/followers","following_url":"https://api.github.com/users/peterhuene/following{/other_user}","gists_url":"https://api.github.com/users/peterhuene/gists{/gist_id}","starred_url":"https://api.github.com/users/peterhuene/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peterhuene/subscriptions","organizations_url":"https://api.github.com/users/peterhuene/orgs","repos_url":"https://api.github.com/users/peterhuene/repos","events_url":"https://api.github.com/users/peterhuene/events{/privacy}","received_events_url":"https://api.github.com/users/peterhuene/received_events","type":"User","site_admin":false},"repo":{"id":100416705,"name":"cli","full_name":"peterhuene/cli","owner":{"login":"peterhuene","id":509666,"avatar_url":"https://avatars3.githubusercontent.com/u/509666?v=4","gravatar_id":"","url":"https://api.github.com/users/peterhuene","html_url":"https://github.com/peterhuene","followers_url":"https://api.github.com/users/peterhuene/followers","following_url":"https://api.github.com/users/peterhuene/following{/other_user}","gists_url":"https://api.github.com/users/peterhuene/gists{/gist_id}","starred_url":"https://api.github.com/users/peterhuene/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peterhuene/subscriptions","organizations_url":"https://api.github.com/users/peterhuene/orgs","repos_url":"https://api.github.com/users/peterhuene/repos","events_url":"https://api.github.com/users/peterhuene/events{/privacy}","received_events_url":"https://api.github.com/users/peterhuene/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/peterhuene/cli","description":"This repo contains the .NET Core command-line (CLI) tools, used for building .NET Core apps and libraries through your development flow (compiling, NuGet package management, running, testing, ...).","fork":true,"url":"https://api.github.com/repos/peterhuene/cli","forks_url":"https://api.github.com/repos/peterhuene/cli/forks","keys_url":"https://api.github.com/repos/peterhuene/cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/peterhuene/cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/peterhuene/cli/teams","hooks_url":"https://api.github.com/repos/peterhuene/cli/hooks","issue_events_url":"https://api.github.com/repos/peterhuene/cli/issues/events{/number}","events_url":"https://api.github.com/repos/peterhuene/cli/events","assignees_url":"https://api.github.com/repos/peterhuene/cli/assignees{/user}","branches_url":"https://api.github.com/repos/peterhuene/cli/branches{/branch}","tags_url":"https://api.github.com/repos/peterhuene/cli/tags","blobs_url":"https://api.github.com/repos/peterhuene/cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/peterhuene/cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/peterhuene/cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/peterhuene/cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/peterhuene/cli/statuses/{sha}","languages_url":"https://api.github.com/repos/peterhuene/cli/languages","stargazers_url":"https://api.github.com/repos/peterhuene/cli/stargazers","contributors_url":"https://api.github.com/repos/peterhuene/cli/contributors","subscribers_url":"https://api.github.com/repos/peterhuene/cli/subscribers","subscription_url":"https://api.github.com/repos/peterhuene/cli/subscription","commits_url":"https://api.github.com/repos/peterhuene/cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/peterhuene/cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/peterhuene/cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/peterhuene/cli/issues/comments{/number}","contents_url":"https://api.github.com/repos/peterhuene/cli/contents/{+path}","compare_url":"https://api.github.com/repos/peterhuene/cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/peterhuene/cli/merges","archive_url":"https://api.github.com/repos/peterhuene/cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/peterhuene/cli/downloads","issues_url":"https://api.github.com/repos/peterhuene/cli/issues{/number}","pulls_url":"https://api.github.com/repos/peterhuene/cli/pulls{/number}","milestones_url":"https://api.github.com/repos/peterhuene/cli/milestones{/number}","notifications_url":"https://api.github.com/repos/peterhuene/cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/peterhuene/cli/labels{/name}","releases_url":"https://api.github.com/repos/peterhuene/cli/releases{/id}","deployments_url":"https://api.github.com/repos/peterhuene/cli/deployments","created_at":"2017-08-15T20:27:47Z","updated_at":"2018-04-11T18:03:02Z","pushed_at":"2018-05-23T00:34:48Z","git_url":"git://github.com/peterhuene/cli.git","ssh_url":"git@github.com:peterhuene/cli.git","clone_url":"https://github.com/peterhuene/cli.git","svn_url":"https://github.com/peterhuene/cli","homepage":"https://github.com/dotnet/core","size":36551,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"dotnet:release/2.1.4xx","ref":"release/2.1.4xx","sha":"8f8770be8a304954cbdfc199c84a2b2cb99be3c3","user":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars0.githubusercontent.com/u/9141961?v=4","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"repo":{"id":43568107,"name":"cli","full_name":"dotnet/cli","owner":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars0.githubusercontent.com/u/9141961?v=4","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dotnet/cli","description":"This repo contains the .NET Core command-line (CLI) tools, used for building .NET Core apps and libraries through your development flow (compiling, NuGet package management, running, testing, ...).","fork":false,"url":"https://api.github.com/repos/dotnet/cli","forks_url":"https://api.github.com/repos/dotnet/cli/forks","keys_url":"https://api.github.com/repos/dotnet/cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dotnet/cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dotnet/cli/teams","hooks_url":"https://api.github.com/repos/dotnet/cli/hooks","issue_events_url":"https://api.github.com/repos/dotnet/cli/issues/events{/number}","events_url":"https://api.github.com/repos/dotnet/cli/events","assignees_url":"https://api.github.com/repos/dotnet/cli/assignees{/user}","branches_url":"https://api.github.com/repos/dotnet/cli/branches{/branch}","tags_url":"https://api.github.com/repos/dotnet/cli/tags","blobs_url":"https://api.github.com/repos/dotnet/cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dotnet/cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dotnet/cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/dotnet/cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dotnet/cli/statuses/{sha}","languages_url":"https://api.github.com/repos/dotnet/cli/languages","stargazers_url":"https://api.github.com/repos/dotnet/cli/stargazers","contributors_url":"https://api.github.com/repos/dotnet/cli/contributors","subscribers_url":"https://api.github.com/repos/dotnet/cli/subscribers","subscription_url":"https://api.github.com/repos/dotnet/cli/subscription","commits_url":"https://api.github.com/repos/dotnet/cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/dotnet/cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/dotnet/cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/dotnet/cli/issues/comments{/number}","contents_url":"https://api.github.com/repos/dotnet/cli/contents/{+path}","compare_url":"https://api.github.com/repos/dotnet/cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dotnet/cli/merges","archive_url":"https://api.github.com/repos/dotnet/cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dotnet/cli/downloads","issues_url":"https://api.github.com/repos/dotnet/cli/issues{/number}","pulls_url":"https://api.github.com/repos/dotnet/cli/pulls{/number}","milestones_url":"https://api.github.com/repos/dotnet/cli/milestones{/number}","notifications_url":"https://api.github.com/repos/dotnet/cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dotnet/cli/labels{/name}","releases_url":"https://api.github.com/repos/dotnet/cli/releases{/id}","deployments_url":"https://api.github.com/repos/dotnet/cli/deployments","created_at":"2015-10-02T18:03:15Z","updated_at":"2018-05-23T20:37:57Z","pushed_at":"2018-05-23T21:45:33Z","git_url":"git://github.com/dotnet/cli.git","ssh_url":"git@github.com:dotnet/cli.git","clone_url":"https://github.com/dotnet/cli.git","svn_url":"https://github.com/dotnet/cli","homepage":"https://github.com/dotnet/core","size":40524,"stargazers_count":2727,"watchers_count":2727,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":858,"mirror_url":null,"archived":false,"open_issues_count":410,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":858,"open_issues":410,"watchers":2727,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/cli/pulls/9327"},"html":{"href":"https://github.com/dotnet/cli/pull/9327"},"issue":{"href":"https://api.github.com/repos/dotnet/cli/issues/9327"},"comments":{"href":"https://api.github.com/repos/dotnet/cli/issues/9327/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/cli/pulls/9327/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/cli/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotnet/cli/pulls/9327/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/cli/statuses/b1f8eb1d8d2eeb470163da33d46bd99f0ab0fdc6"}},"author_association":"MEMBER","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"peterhuene","id":509666,"avatar_url":"https://avatars3.githubusercontent.com/u/509666?v=4","gravatar_id":"","url":"https://api.github.com/users/peterhuene","html_url":"https://github.com/peterhuene","followers_url":"https://api.github.com/users/peterhuene/followers","following_url":"https://api.github.com/users/peterhuene/following{/other_user}","gists_url":"https://api.github.com/users/peterhuene/gists{/gist_id}","starred_url":"https://api.github.com/users/peterhuene/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peterhuene/subscriptions","organizations_url":"https://api.github.com/users/peterhuene/orgs","repos_url":"https://api.github.com/users/peterhuene/repos","events_url":"https://api.github.com/users/peterhuene/events{/privacy}","received_events_url":"https://api.github.com/users/peterhuene/received_events","type":"User","site_admin":false},"comments":0,"review_comments":3,"maintainer_can_modify":false,"commits":2,"additions":175,"deletions":100,"changed_files":38}}
{"actor":{"display_login":"peterhuene"}}