Open Schroedingers-Cat opened 1 month ago
To my understanding, this issue may lie in the System.IO.Packaging
code that parses the .nupkg
, where it cannot parse the special characters. Assuming that is the case, it may not be possible to easily fix on the v1 side. It may require escaping the text before the .nupkg
is parsed by the packaging code, likely in the nuget-chocolatey
assembly.
It should be possible to easily fix on v2 package creation side. I think all it would require is a call to html escape the filename for the override element in the package builder. This is because the newer NuGet assemblies are now more directly creating and parsing the packages instead of relying on System.IO.Packaging
.
Thanks for raising this issue.
We only support the latest version of Chocolatey CLI for community users, which is currently 2.2.2. Version 1.x is only supported for customers.
Customers are likely to be using only one major version of Chocolatey CLI and not mixing them.
To encounter this, a customer would need to have a package with a filename containing special characters and be packing for Chocolatey CLI 1.x using Chocolatey CLI 2.x. This is a very niche issue.
The workaround (mentioned on Discord?) could be to zip up the files with the special characters and extract them from the package.
If a customer does encounter this, please reach out to the Chocolatey Support Team by running to choco support
to find your options.
Checklist
What You Are Seeing?
Packages created with the current chocolatey version 2.2.2 are incompatible with chocolatey 1.4.0 if the included data contains a special character like
{
or}
. Packages affected by this won't install because "The package was not found with the source(s) listed."What is Expected?
I'd expect packages created with chocolatey v2.2.2 to also work with chocolatey v1.4.0 if the dependencies are met.
How Did You Get This To Happen?
-s "."
for the current directory). Choco won't find the package.For reference, here are the packages build with the respective choco versions: choco-140-incompat-created-with-140.zip choco-140-incompat-created-with-222.zip
System Details
Installed Packages
Output Log
Additional Context
Rebuilding packages affected by this with chocolatey v1.4.0 fixes the problem.
Also, replacing the special characters in
[Content_Types].xml
fixes the issue. For instance, from this:to this: