-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
win_chocolatey fails after update to v2.4.0 #168
Comments
@Outek on the machine where Chocolatey CLI is running, can you run the following command:
And let me know the result of that command? The reason that I am asking is, as per the release notes for 2.3.0 of Chocolatey CLI, there were some changes to the enhancedExitCodes that Chocolatey CLI provides. Starting with 2.3.0, there are new enhanced exit codes when running the If you run Which I suspect might be the reason that you are seeing a difference between 2.2.2 and 2.4.0. |
It's enabled in both versions. PS C:\> choco feature get --name=useEnhancedExitCodes
Chocolatey v2.2.2
Enabled PS C:\> choco feature get --name=useEnhancedExitCodes
Chocolatey v2.4.0
Enabled |
@Outek thank you for confirming! In which case, I think this answers your question. Using Chocolatey CLI 2.4.0 out of the box, when you attempt to run an upgrade command, on a package that is already at the highest available version available, you will get the following:
NOTE: The exit code here is 0. However, when you enable the
NOTE: The exit code is now 2. I am guessing here that Ansible is then interpreting this non-zero exit code as a failure. I am not an Ansible expert, but I would guess that there is a way to handle this specific exit code when running this command. Or, you could disable that Chocolatey CLI feature. |
Based on some feedback from @jborean93 here: ansible-collections/ansible.windows#696 (comment) It looks like there might be some additional work to be done here to correctly handle this situation. @Outek for now, my suggestion would be that if you are not actively using the |
I have marked this issue as an |
This is ok for me, thank you for the support. I changed the setting already in our dev environment without any issues. I don't know for sure, why i changed it in the first place. |
Checklist
What You Are Seeing?
We have plans, to upgrade chocolatey(free version) to version the latest version v2.4.0, which was released last week.
Some playbooks now have errors with the new version, but if i downgrade to v2.2.2, everything is working fine again. If i try the command(choco upgrade/install packagename) manually, everything is working fine too.
What is Expected?
The package is already installed with the latest version and no error is expected.
How Did You Get This To Happen?
Check with Chocolatey 2.2.2, and rerun test after upgrade to 2.4.0
System Details
Installed Packages
Output Log
Additional Context
No response
The text was updated successfully, but these errors were encountered: