PSResourceGet icon indicating copy to clipboard operation
PSResourceGet copied to clipboard

Add 'ToLower' before name comparison and split

Open alerickson opened this issue 1 year ago • 0 comments

PR Summary

When installing from a local repositories, the comparison done to split a full nupkg name (eg. 'Microsoft.PowerShell.PSResourceGet.1.1.0-RC1.nupkg') into both name ('Microsoft.PowerShell.PSResourceGet') and version+extension ('1.1.0-RC1.nupkg') needs to be case insensitive.

The .nupkg name typically all lowercase, whereas the version for a package may contain some uppercase characters that cause the split comparison to fail.

This PR adds .ToLower() to both the full package name and to the 'package version and extension' in order to ensure case insensitivity all round.

Note: this bug was reproducible when attempting to find or install "Microsoft.PowerShell.PSResourceGet" v1.1.0-RC1 from a local repository. Bug was caught through CI failure.

PR Context

PR Checklist

alerickson avatar Oct 25 '24 18:10 alerickson