{"action":"created","issue":{"url":"https://api.github.com/repos/chocolatey/choco/issues/822","repository_url":"https://api.github.com/repos/chocolatey/choco","labels_url":"https://api.github.com/repos/chocolatey/choco/issues/822/labels{/name}","comments_url":"https://api.github.com/repos/chocolatey/choco/issues/822/comments","events_url":"https://api.github.com/repos/chocolatey/choco/issues/822/events","html_url":"https://github.com/chocolatey/choco/issues/822","id":161612822,"number":822,"title":"no longer able to run choco commands from chocolateyInstall.ps1","user":{"login":"pauxus","id":1023744,"avatar_url":"https://avatars.githubusercontent.com/u/1023744?v=3","gravatar_id":"","url":"https://api.github.com/users/pauxus","html_url":"https://github.com/pauxus","followers_url":"https://api.github.com/users/pauxus/followers","following_url":"https://api.github.com/users/pauxus/following{/other_user}","gists_url":"https://api.github.com/users/pauxus/gists{/gist_id}","starred_url":"https://api.github.com/users/pauxus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pauxus/subscriptions","organizations_url":"https://api.github.com/users/pauxus/orgs","repos_url":"https://api.github.com/users/pauxus/repos","events_url":"https://api.github.com/users/pauxus/events{/privacy}","received_events_url":"https://api.github.com/users/pauxus/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/chocolatey/choco/labels/0%20-%20_Triaging","name":"0 - _Triaging","color":"eeeeee"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-06-22T07:36:29Z","updated_at":"2016-06-22T09:37:06Z","closed_at":null,"body":"Since 0.9.10, with the cleanup of unfinished packages, it is no longer possible to run choco commands from inside a chocolateyInstall.ps1\r\n\r\nOur rationale for that is that we have a kickstarter package, which resides on an uprotected feed. This package asks for username and password and configures the chocolatey sources to point to our feed aggregator (nexus), using the user credentials.\r\n\r\nThis stopped working with 0.9.10, since any run of the choco command seems to clean the currently installing package from the lib folder, resulting in an unsuccessful installation.\r\n\r\n\r\nIn order to fix this, we would either need to:\r\n\r\n- provide a way to tell commands not to clean up pending packages\r\n- mark a package a \"uncleanable\"\r\n- exempt the cleanup from certain unrelated commands (like choco source)\r\n- provide cmdlets for common tasks to use form inside an install script (i.e. changeChocoSource or something)"},"comment":{"url":"https://api.github.com/repos/chocolatey/choco/issues/comments/227692917","html_url":"https://github.com/chocolatey/choco/issues/822#issuecomment-227692917","issue_url":"https://api.github.com/repos/chocolatey/choco/issues/822","id":227692917,"user":{"login":"ferventcoder","id":63502,"avatar_url":"https://avatars.githubusercontent.com/u/63502?v=3","gravatar_id":"","url":"https://api.github.com/users/ferventcoder","html_url":"https://github.com/ferventcoder","followers_url":"https://api.github.com/users/ferventcoder/followers","following_url":"https://api.github.com/users/ferventcoder/following{/other_user}","gists_url":"https://api.github.com/users/ferventcoder/gists{/gist_id}","starred_url":"https://api.github.com/users/ferventcoder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ferventcoder/subscriptions","organizations_url":"https://api.github.com/users/ferventcoder/orgs","repos_url":"https://api.github.com/users/ferventcoder/repos","events_url":"https://api.github.com/users/ferventcoder/events{/privacy}","received_events_url":"https://api.github.com/users/ferventcoder/received_events","type":"User","site_admin":false},"created_at":"2016-06-22T09:37:06Z","updated_at":"2016-06-22T09:37:06Z","body":"\r\n> * provide a way to tell commands not to clean up pending packages\r\n\r\nRight now the answer is to delete the `.pending` file in the top of the package directory prior to calling any choco commands.\r\n\r\n> * mark a package a \"uncleanable\"\r\n\r\nInteresting\r\n\r\n> * exempt the cleanup from certain unrelated commands (like choco source)\r\n\r\nThis could be confusing in what commands would trigger the pending cleanup\r\n\r\n> * provide cmdlets for common tasks to use form inside an install script (i.e. changeChocoSource or something)\r\n\r\nThis could be the best option. \r\n\r\n\r\nThis is quite an interesting way of going about it. Another option is to look at the timestamp for that .pending file and only react if it is over say 2 minutes old?"}}
{"actor":{"display_login":"ferventcoder"}}