Reputation: 495
I am trying to install Windows Azure Powershell with the chocolatey_package in Chef. The new 0.9.10.2 version of Chocolatey returns the application exit code that can be other than 0 even after a successful install.
0 - most widely used success exit code
1605 - (MSI uninstall) - the product is not found, could have already been uninstalled
1614 (MSI uninstall) - the product is uninstalled
1641 (MSI) - restart initiated
3010 (MSI, InnoSetup can be passed to provide this) - restart required
In this case the code is 3010, because the installation succeeded, but a reboot is needed. Chef displays the following message:
Expected process to exit with [0], but received '3010'
.
For Chef 0 is the only success exit code. I have tried to send options to Chocolatey to ignore the application exit code and send 0 to Chef, but none of the formats seem to work:
chocolatey_package 'windowsazurepowershell' do
options "--ignore-package-exit-codes=true"
end
I have also tried
options "--ignore-package-exit-codes=3010"
options "--use-package-exit-codes=false"
Based on the documentation the following options should be valid:
ignorepackagecodes ignorepackageexitcodes ignore-package-codes ignore-package-exit-codes
usepackagecodes usepackageexitcodes use-package-codes use-package-exit-codes
EDIT
Thanks for the help, I have tested the new 0.9.10.3 version of Chocolatey, and works great with
chocolatey_package 'windowsazurepowershell' do
options "--ignore-package-exit-codes"
end
Upvotes: 2
Views: 1210
Reputation: 12571
This was due to a bug in 0.9.10, which is fixed in 0.9.10.3. See https://github.com/chocolatey/choco/issues/827 for details.
Upvotes: 1
Reputation: 54221
This is being tracked in https://github.com/chef/chef/issues/5030. There is not a great solution right now other than what that ticket shows.
Upvotes: 0