r-darwish / topgrade

Upgrade everything
GNU General Public License v3.0
3.36k stars 160 forks source link

Topgrade breaks Chocolatey v1.0.0 setup for licensed customers #875

Closed wadoli closed 2 years ago

wadoli commented 2 years ago

What did you expect to happen?

With the recent release of Version 1.0.0 of Chocolatey, (only) licensed customers get their Chocolatey setup broken. As noted in the release notes for the Chocolatey Licensed Extension v4.0.0,

When using Chocolatey Licensed Extension, the order of upgrading packages is very important! You should perform choco upgrade chocolatey.extension first, and Chocolatey will then ensure all required dependencies are in place. If you first attempt to do choco upgrade chocolatey, followed by choco upgrade chocolatey.extension, there will be complications. If you find yourself in this situation, reach out to the Support Team for assistance.

Topgrade currently doesn't seem to follow that order

What actually happened?

After topgrade has updated choco to version 1.0.0, licensed customers get an error message along the line of

Chocolatey v1.0.0 Professional
The registered delegate for type IEnumerable<ICommand> threw an exception. Der Typ "chocolatey.infrastructure.app.commands.ChocolateyVersionCommand" in der Assembly "choco, Version=1.0.0.0, Culture=neutral, PublicKeyToken=[redacted]" konnte nicht geladen werden.

Additional details

r-darwish commented 2 years ago

What a terrible design 🤦 Is there easy way to check if licensed extension is installed?

TheCakeIsNaOH commented 2 years ago

@r-darwish This command should work: choco list chocolatey.extension --local-only --exact --limit-output. It will output chocolatey.extension|<version> if the licensed extension is installed.

Alternatively, if the $env:ChocolateyInstall\lib\chocolatey.extension folder exists, then the licensed extension should be installed.

gep13 commented 2 years ago

It may be a good idea to perform a command like the following:

choco upgrade all --except="'chocolatey'"

That way users are opting into any changes to Chocolatey, since there can and will be breaking changes to the application in the future.

wadoli commented 2 years ago

The initially reported problem has been addressed by the Chocolatey team in version 1.0.1 of the Chocolatey CLI, see https://docs.chocolatey.org/en-us/choco/release-notes#march-24-2022

r-darwish commented 2 years ago

@wadoli thanks for updating. No action will be done in Topgrade, then