Browse Source

fix: lists will remove duplicate elements when merging yaml.

This will solve the duplicate warning that docker-compose issues
notably on ``links``.
raw-remaining-args
Valentin Lab 8 years ago
parent
commit
ad5e792430
  1. 5
      bin/compose

5
bin/compose

@ -78,7 +78,10 @@ def merge(*args):
elif all(isinstance(arg, list) for arg in args):
res = []
for arg in args:
res.extend(arg)
for elt in arg:
if elt in res:
res.remove(elt)
res.append(elt)
return res
elif all(isinstance(arg, dict) for arg in args):
keys = set()

Loading…
Cancel
Save