Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ACR Integration: Bug fix for publishing a module that is not all lowercase to ACR repo #1502

Merged
merged 1 commit into from
Jan 4, 2024

Conversation

alerickson
Copy link
Member

PR Summary

This PR addresses a small bug when publishing to ACR registries. ACR only allows all lowercase names. This PR takes all module names and ensures that it's lowercase when publishing to ACR. It does not modify the files or .nupkg, just the name that gets sent in the HTTP calls to ACR.

PR Context

Previously, when attempting to publish 'TestModule.psd1' a 404 error would be returned. The exact same file named 'testmodule.psd1' would successfully publish. This is because the Publish-PSResource implementation gets the module name from the file _pkgName = System.IO.Path.GetFileNameWithoutExtension(pathToFileToPublish). However, ACR does not care about the casing of the file or the .nupkg, just the metadata it receives.

PR Checklist

@alerickson alerickson requested a review from anamnavi January 2, 2024 22:00
@alerickson alerickson merged commit 48c0ee7 into PowerShell:master Jan 4, 2024
4 checks passed
@alerickson alerickson deleted the publishNameBugFix branch January 4, 2024 00:48
alerickson added a commit to alerickson/PSResourceGet that referenced this pull request Apr 1, 2024
alerickson added a commit to alerickson/PSResourceGet that referenced this pull request Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants