The current method of splitting by directly calling .split will cause a stack trace in this event, even if the key which is nil is not something we are looking for.
To prevent that I've simply added a method that will ensure two items are always returned when splitting an envvar string. If an ennvar is nil, the value returned for val will be None.
In
roles.py
there are several places where a string representing an envvar (formatted askey=val
) is split like so:It's possible however that these strings can also be formatted as simply
key
due to a nil environment variable being set on the docker container.eg: if you launch a container like so:
docker run -e 'FOO' -it ubuntu
when you inspect the container, it's JSON output will look like so:The current method of splitting by directly calling
.split
will cause a stack trace in this event, even if the key which is nil is not something we are looking for.To prevent that I've simply added a method that will ensure two items are always returned when splitting an envvar string. If an ennvar is nil, the value returned for
val
will beNone
.