Closed jmilacek closed 7 years ago
Need the log file from Chocolatey as well.
So I see Chef 12.8.1. We'll need to know Chocolatey version, Windows version and PowerShell version.
cc @mwrock heads up.
FYI this was fixed in a recent version of chef https://github.com/chef/chef/pull/4760. Not a bad idea though to update choco to work with older versions.
@mwrock Still not even sure what the issue is.
Not sure which version but somewhere between 0.9.10.2 and 0.10.0, choco started printing Chocolatey v0.X.X
as the first line of output from choco list
and other commands. That confused the chef parsing of packages and versions returned from that command and the fix was just to ignore that line.
I'm running Chocolatey v0.10.0. Windows Server 2012R2. PowerShell v5.
Not sure which version but somewhere between 0.9.10.2 and 0.10.0, choco started printing Chocolatey v0.X.X as the first line of output from choco list and other commands. That confused the chef parsing of packages and versions returned from that command and the fix was just to ignore that line.
Even with -r
?
Ahh looking through the history it looks like thats when we were using -ar
which has the line. We use -r
now and no that omits the version line.
Weird that -ar
included the line, I imagine that the --all
option is not a global configuration value, which means when -ar
is evaluated as a blended option it errors and then later then -a
is available, it configures -ar
options appropriately, but only after having printed out Chocolatey vXX.XX
So it doesn't look like it was fixed in 0.10.0? That's what I'm running but it still does it.
@blackdynamite595 the issue is your Chef version. Please upgrade as soon as possible as Chef was running incorrectly with Chocolatey. It's not something we can work around really (unfortunately due to how the version you have passed arguments to Chocolatey).
You can alternatively apply the patch that @mwrock linked to above.
Or to put it another way, the bug is most likely in the version of Chef that you are currently using. If it turns out to be the same issue, that is what it is.
Going to close this as not an issue with Chocolatey.
Please feel free to comment if you feel there is a fix on the Chocolatey side for this.
What You Are Seeing?
Issue started after 8/11/16 update of https://chocolatey.org/packages/pstools
After chef run:
What is Expected?
chocolately package installs
How Did You Get This To Happen? (Steps to Reproduce)
In chef code:
Output Log