Closed gaelcolas closed 1 year ago
I'm OK merging it the way you've written it -- that's guaranteed not to have any side effects, but I agree with your points -- it seems to me that putting the sort in (although it will have a tiny performance impact) is safe enough.
As you say, it won't really change the outcome except in this edge case where the outcome is unexpectedly unpredictable and breaks things.
I'll favour #120 as it keeps the change simpler and doesn't affect the UX. If needed we can fall back to this more complex approach.
fixes #118 This is the flexible approach so we can have more customized sorting mechanism.
The alternative is that we mandate the sorting by always adding
| Sort-Object -Property 'FullName'
to theGet-ChildItem
.TBH, I prefer the latter since:
but it's also a bit more risky as it changes the code path, and is less flexible (although, we may not need to be too clever anyway). Let me know and I can amend the PR with your suggestion. I'd love to get that sorted and published "soon", so my build can be fixed (and finally OSS'ed..). Thanks, Gael