themill / wiz

Environment management framework
GNU Lesser General Public License v3.0
45 stars 4 forks source link

Definition encoding can be inconsistent #41

Closed buddly27 closed 4 years ago

buddly27 commented 4 years ago

Encoding of definitions can be inconsistent as command and environment mapping are not converted into OrderedDict.

>>> definition = wiz.definition.Definition({"identifier": "foo", "environ": {"KEY1": "VALUE1", "KEY2": "VALUE2"}})
>>> print(definition.encode())
{
    "identifier": "foo",
    "environ": {
        "KEY1": "VALUE1",
        "KEY2": "VALUE2"
    }
}
>>> print(definition.encode())
{
    "identifier": "foo",
    "environ": {
        "KEY2": "VALUE2",
        "KEY1": "VALUE1"
    }
}