5.0.16 Git changing order or configuration files

5.0.16 Git changing order or configuration files

avatar
(anonymous user)
Product: PowerShell Universal
Version: 5.0.16


Hi,

Im having an issue with PowerShell universal where whenever i make a change to a script or app it seems to change the scripts.ps1, schedules.ps1 or dashboards.ps1. It doesn’t make any meaningful change it just changes the order they appear in the file. Whilst this doesnt break anything it does mean i have to make go through each commit to make sure nothing has been removed.

Example:



0ea8997185697dc6d232f0dbbb15baee8d690060

0ea8997185697dc6d232f0dbbb15baee8d690060.png

All Comments (5)

avatar

This isn’t new or unique to 5.0.16, but I do agree that it’s super annoying and I haven’t ever found a logical explanation for why it happens. With a config file such as this, it isn’t a big deal, but I’m afraid of it happening to something where the order of the lines actually does matter (such as text file).

avatar

Something interesting to note is that it does order them by First letter of the name.

avatar

Whereas the “before” image shows they were stored in partial reverse alphabetical order.

avatar

The before image is the order in which i created these apps.

avatar

PSU tries to put them into a deterministic order to prevent reordering in the future. There were issues where saving files would cause things to reorder even when nothing was actually changed. That said, it should always be like that and not unnecessarily be reordering things since that was the original intent on ordering them alphabetically.

If you are experiencing issues with this, please open an issue in the tracker.

Adam Driscoll
PowerShell Expert and Developer at Devolutions