-
Notifications
You must be signed in to change notification settings - Fork 47
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
Sort the results of Get-SecretInfo
correctly
#219
base: main
Are you sure you want to change the base?
Conversation
@andyleejordan are there any potential regressions with, say, piping two secretinfo results with the same name to |
I am unsure and need to get some more folks to look at this. Also, I had a thought that it probably doesn't even need to build a set, I don't see why we can't just sort the array with the comparer I added. |
3bf1949
to
654462c
Compare
SortedSet
to sort the results of Get-SecretInfo
Get-SecretInfo
correctly
Yup, that's better. No idea why this had a dictionary in the first place, all it needed was a comparer. |
Well, instead of erroring because of the duplicate names it should now correctly print them both. |
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.
You should add a test.
It's too bad we didn't catch this sooner and make the secret name case-insensitive, but it would be a breaking change now. |
Fair 😆 I'll figure that out...I need to make another PR setting up build/test tasks because that's been the slowest part of this. |
My understanding of it is that secret names aren't necessarily case-sensitive, at least as far as |
Instead of using a `SortedDictionary` which introduced a bug because it required the keys (secret names) to be unique, we just sort the array directly using a comparer that sorts by name. Fixes #95.
654462c
to
efe1e2f
Compare
Instead of using a
SortedDictionary
which introduced a bug because it required the keys (secret names) to be unique, we just sort the array directly using a comparer that sorts by name. Fixes #95.