{"action":"created","issue":{"url":"https://api.github.com/repos/chocolatey/choco/issues/198","labels_url":"https://api.github.com/repos/chocolatey/choco/issues/198/labels{/name}","comments_url":"https://api.github.com/repos/chocolatey/choco/issues/198/comments","events_url":"https://api.github.com/repos/chocolatey/choco/issues/198/events","html_url":"https://github.com/chocolatey/choco/issues/198","id":63773909,"number":198,"title":"Transactional \"Installed\" Marking (Aborted Packages Currently Marked As \"Installed\")","user":{"login":"DarwinCSIWindowscom","id":10516712,"avatar_url":"https://avatars.githubusercontent.com/u/10516712?v=3","gravatar_id":"","url":"https://api.github.com/users/DarwinCSIWindowscom","html_url":"https://github.com/DarwinCSIWindowscom","followers_url":"https://api.github.com/users/DarwinCSIWindowscom/followers","following_url":"https://api.github.com/users/DarwinCSIWindowscom/following{/other_user}","gists_url":"https://api.github.com/users/DarwinCSIWindowscom/gists{/gist_id}","starred_url":"https://api.github.com/users/DarwinCSIWindowscom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DarwinCSIWindowscom/subscriptions","organizations_url":"https://api.github.com/users/DarwinCSIWindowscom/orgs","repos_url":"https://api.github.com/users/DarwinCSIWindowscom/repos","events_url":"https://api.github.com/users/DarwinCSIWindowscom/events{/privacy}","received_events_url":"https://api.github.com/users/DarwinCSIWindowscom/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/chocolatey/choco/labels/0%20-%20Backlog","name":"0 - Backlog","color":"CCCCCC"},{"url":"https://api.github.com/repos/chocolatey/choco/labels/Enhancement","name":"Enhancement","color":"0052cc"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-03-23T16:53:44Z","updated_at":"2015-03-23T17:35:02Z","closed_at":null,"body":"It would be nice if Chocolatey had a transactional approach to whether a package is considered installed. Currently if I abort a package shortly after it starts - re running says it is installed.\r\n\r\nI know I can use -Force to override - but it is a bit counter intuitive. I assume Chocolatey is using the existence of the package folder for \"installed\" and that this folder is created at the start of an install.\r\n\r\nWhat if a tag file like InstallCompleted.txt was added to the package folder upon an error free completion?\r\n\r\nThis simple change would allow chocolatey to have a more \"transactional\" approach to \"installed\" marking without too much change or effort."},"comment":{"url":"https://api.github.com/repos/chocolatey/choco/issues/comments/85116807","html_url":"https://github.com/chocolatey/choco/issues/198#issuecomment-85116807","issue_url":"https://api.github.com/repos/chocolatey/choco/issues/198","id":85116807,"user":{"login":"DarwinCSIWindowscom","id":10516712,"avatar_url":"https://avatars.githubusercontent.com/u/10516712?v=3","gravatar_id":"","url":"https://api.github.com/users/DarwinCSIWindowscom","html_url":"https://github.com/DarwinCSIWindowscom","followers_url":"https://api.github.com/users/DarwinCSIWindowscom/followers","following_url":"https://api.github.com/users/DarwinCSIWindowscom/following{/other_user}","gists_url":"https://api.github.com/users/DarwinCSIWindowscom/gists{/gist_id}","starred_url":"https://api.github.com/users/DarwinCSIWindowscom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DarwinCSIWindowscom/subscriptions","organizations_url":"https://api.github.com/users/DarwinCSIWindowscom/orgs","repos_url":"https://api.github.com/users/DarwinCSIWindowscom/repos","events_url":"https://api.github.com/users/DarwinCSIWindowscom/events{/privacy}","received_events_url":"https://api.github.com/users/DarwinCSIWindowscom/received_events","type":"User","site_admin":false},"created_at":"2015-03-23T17:35:02Z","updated_at":"2015-03-23T17:35:02Z","body":"I don't think these are the same - I have that CTRL-C behavior as well.  So after CTRL-C the powershell prompt where that occured asks if you would like to abort the current batch file y/n - it's exactly the prompt you get when breaking out of a .CMD or .BAT - but it won't go away not matter what - you have to close the prompt.\r\n\r\nThis request is broader => no matter how a package dies (in my case while I'm developing a chocolatey package and my code isn't solid yet and I get a PowerShell error), then the next attempt to install the package say it is already installed and requires either a -Force or a deinstall and reinstall.  It seems like Chocolately should only mark a package as complete if it actually completed successfully.\r\n\r\nMaybe it's already supposed to work that way but does not work properly when an actual powershell error occurs?  I was *assuming* it uses the presence of the package folder as an \"already installed\" marker - which would explain this behavior - but definitely and assumption."}}