-
Notifications
You must be signed in to change notification settings - Fork 100
Bugfix for comparing file path name to determine exact match #1817
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
Conversation
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
Can we add a test? |
adityapatwardhan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a test
|
Looks good, agree with adding the test if it's feasible. |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
I think it's possible this PR fixes bug #1837. Making a note for one of us to come back to this :) |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
Has this bug been fixed? And has the fix been released? |
|
Hi @Alex-AZPS , yes this was released in 1.2.0-preview3. Let me know if you face any issues with this still. |
PR Summary
Utils.cs has GetMetadataFilesFromPath() that is used by the PublishPSResource and LocalServerApiCalls classes.
In that method we find files which match the package name such as the .psd1, .ps1, .nuspec files. It catches file names that match
packageName*but that includes files that should not be matched. For example, the Az.KeyVault package has 2 .psd1 files:AzKeyVault.psd1andAz.KeyVault.Extension.psd1and the latter was getting considered as a valid match. This PR fixes that. Thestring.Compare()method is already correctly determining if the filename is a correct match so the code to store that file path as a path of interest should happen in that condition set bystring.Compare()PR Context
Resolves Azure/azure-powershell#27535
Resolves #1837 #1762
PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerWIP:or[ WIP ]to the beginning of the title (theWIPbot will keep its status check atPendingwhile the prefix is present) and remove the prefix when the PR is ready.