Merge pull request #2006 from dmurphy18/no_sort_lists_dicts

Don't sort lists and dicts, as order of items matters
This commit is contained in:
David Murphy 2024-07-15 15:30:41 -06:00 committed by GitHub
commit d88e9c3b3d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2369,7 +2369,7 @@ __overwriteconfig() {
fi
# Convert json string to a yaml string and write it to config file. Output is dumped into tempfile.
"$good_python" -c "import json; import yaml; jsn=json.loads('$json'); yml=yaml.safe_dump(jsn, line_break='\\n', default_flow_style=False); config_file=open('$target', 'w'); config_file.write(yml); config_file.close();" 2>"$tempfile"
"$good_python" -c "import json; import yaml; jsn=json.loads('$json'); yml=yaml.safe_dump(jsn, line_break='\\n', default_flow_style=False, sort_keys=False); config_file=open('$target', 'w'); config_file.write(yml); config_file.close();" 2>"$tempfile"
# No python errors output to the tempfile
if [ ! -s "$tempfile" ]; then