Closed mmeade-netapp closed 3 years ago
Downloaded install.ps1 script has a function called Test-ChocolateyInstalled which returns true if chocolatey is installed or the chocolatey install folder exists and is not empty. It returns true and the installer exists. The default chocolatey folder isn’t empty because the downloaded script is placed here.
This is a duplicate of this issue: https://github.com/chocolatey/cChoco/issues/151
I am going to close this one in favour of that one.
I like this title better and it more succinctly describes the problem. However the conversation has already started with the other issue and a better explanation of the security reasons why this was changed. There is also a workaround posted over there.
Describe the bug We have been using cChoco for about a year with good results. This afternoon PDT, reports of failed deployments began which were caused by a failure to install chocolatey by using the resource below:
The configuration, if ran with the verbose switch, detects that chocolatey isn't installed with the test script and the set script fails to install with the stated reason that it was already installed. See attached image.
We are using cChoco version 2.4.1.0
I was able to use the web download install script to install Chocolatey successfully, then the rest of the cChoco resource functioned as expected.
After a failed run of the Choco resource, a C:\ProgramData\chocolatey folder is created with a single PowerShell script. Attached:
install.ps1.txt