{"action":"opened","issue":{"url":"https://api.github.com/repos/chocolatey/choco/issues/367","labels_url":"https://api.github.com/repos/chocolatey/choco/issues/367/labels{/name}","comments_url":"https://api.github.com/repos/chocolatey/choco/issues/367/comments","events_url":"https://api.github.com/repos/chocolatey/choco/issues/367/events","html_url":"https://github.com/chocolatey/choco/issues/367","id":97719144,"number":367,"title":"If ChocolateyPath is set incorrectly, updating to 0.9.10-alpha1 fails","user":{"login":"chucker","id":20194,"avatar_url":"https://avatars.githubusercontent.com/u/20194?v=3","gravatar_id":"","url":"https://api.github.com/users/chucker","html_url":"https://github.com/chucker","followers_url":"https://api.github.com/users/chucker/followers","following_url":"https://api.github.com/users/chucker/following{/other_user}","gists_url":"https://api.github.com/users/chucker/gists{/gist_id}","starred_url":"https://api.github.com/users/chucker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chucker/subscriptions","organizations_url":"https://api.github.com/users/chucker/orgs","repos_url":"https://api.github.com/users/chucker/repos","events_url":"https://api.github.com/users/chucker/events{/privacy}","received_events_url":"https://api.github.com/users/chucker/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-07-28T14:25:34Z","updated_at":"2015-07-28T14:25:34Z","closed_at":null,"body":"In my setup, the environment was set as follows (I'm not sure why):\r\n\r\n    ChocolateyInstall=C:\\ProgramData\\chocolatey // machine-level\r\n    ChocolateyPath=C:\\Chocolatey // user-level\r\n\r\nHowever, Chocolatey was always in `%programdata%`, so the second var was never correct. This wasn't a problem during the 0.9.9.x upgrades, but the update to 0.9.10-alpha1 (20150725) will try to remove what it believes to be the old path:\r\n\r\n    Attempting to upgrade 'C:\\Chocolatey' to 'C:\\ProgramData\\chocolatey'.\r\n     WARNING: Copying the contents of 'C:\\Chocolatey' to 'C:\\ProgramData\\chocolatey'.\r\n      This step may fail if you have anything in this folder running or locked.\r\n     If it fails, just manually copy the rest of the items out and then delete the folder.\r\n     !!!! ATTN: YOU WILL NEED TO CLOSE AND REOPEN YOUR SHELL !!!!\r\n     Copy-Item : Cannot find path 'C:\\Chocolatey\\lib' because it does not exist.\r\n     At C:\\ProgramData\\chocolatey\\lib\\chocolatey\\tools\\chocolateysetup.psm1:223 char:5\r\n     +     Copy-Item \"$chocolateyPathOld\\lib\\*\" \"$chocolateyPath\\lib\" -force ...\r\n     +     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n         + CategoryInfo          : ObjectNotFound: (C:\\Chocolatey\\lib:String) [Copy-Item], ItemNotFoundException\r\n         + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.CopyItemCommand\r\n\r\nRemoving the ChocolateyPath variable apparently makes Chocolatey fall back to the (correctly set) ChocolateyInstall variable."}}