chocolatey / chocolatey/choco

Uninstalling a package throws an error if the case of the nuspec file is different in lib as it is in the nupkg

Open
#1,040 16 comments 0 reactions 0 assignees View on GitHub
0 - Backlog Bug Priority - High
Dominant language
C#
Stars
11.5k
Forks
960
PR merge metrics
No merged PRs in 30d

Description

### What You Are Seeing?
When uninstalling a package where the id in `lib\packageName.nuspec` and the nuspec file inside `lib\packageName.nupkg` have different casing, the uninstallation process throws an error
reporting that the `lib\PackageName` path was not found.

It does not matter if the uninstall script is run, or if it is skipped.

### What is Expected?
No error even if the casing is different

### How Did You Get This To Happen? (Steps to Reproduce)
I'll give an example with the InnoSetup package.
The casing on the website uses upper case I and S, while when I pushed
the package with all lowercase.
When that package is then installed, the casing of the id element in the nuspec file inside the downloaded nupkg file and the nuspec file in the lib folder are different causing the error of a path not found.

### Output Log
https://gist.github.com/AdmiringWorm/bac515b64b3d4e22f5eba385b07efb5c

### Tested with choco versions
choco 0.10.3 (Error occurred)
choco 0.10.2 (Error occurred)
choco 0.10.1 (No Error)

Contributor guide

Open the contributing guide

Research direction

Start with the uninstall path and the linked output log, reproducing the issue with the InnoSetup package and comparing the casing in lib\packageName.nuspec with the nuspec inside lib\packageName.nupkg. Check behavior across the listed Chocolatey versions. Done means uninstalling packages with casing differences completes without a path-not-found error, whether or not the uninstall script runs.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
cli, devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.