Closed sintak123 closed 8 months ago
What re the values of $Source
and $Cache
or what values could be used to reproduce this?
Ignore this, it's in the log.
I didn't notice this until I came to reproduce it, but you're not telling Chocolatey CLI which version to downgrade to. You need to specify a --version
. See the screenshot below, the first command doesn't provide a version and the second one does.
I also tried to use 1.2.0 to downgrade putty after installing it.
This also didn't work because I didn't specify a version. When I did specify a version, it worked:
So I can't reproduce the issue that you mentioned. The commands you mentioned didn't work because no version was specified, and that's expected behaviour.
Also note that we don't support v1.x of Chocolatey CLI open-source. I know you were using this in your example and may not be using it outside of that, but I wanted to mention it.
Thank you for you prompt answer. I will change my script to get the version from the local package and include it in the downgrade. I find it a little redundant, as there is only one version available, but it will work. Thank you again!
The issue was solved for my case.
I find it a little redundant, as there is only one version available
Downgrading is not an every day action, and potentially has consequences, depending on the software, versions etc. Being very explicit about what you want to do here, and not having Chocolatey CLI guess or make the decision, is a very deliberate behaviour from us to protect you.
Checklist
What You Are Seeing?
When downgrading a any package with local source the downgrade fails.
What is Expected?
The downgrade is succesfull.
How Did You Get This To Happen?
choco upgrade chocolatey
choco upgrade chocolatey -y -source $Source --cache $Cache --force --allow-downgrade
Samechoco upgrade Company.MyApp -y -source $Source --cache $Cache --force --allow-downgrade
choco upgrade Company.MyApp -y -source $Source --cache $Cache --force --allow-downgrade
System Details
Installed Packages
Output Log
Additional Context
On the same machine the downgrade worked when the source was the standard one and/or choco version was 1.2.0