We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6c45b6c commit dfc6206Copy full SHA for dfc6206
1 file changed
compose/service.py
@@ -617,15 +617,18 @@ def split_port(port):
617
return internal_port, (external_ip, external_port or None)
618
619
620
+def get_env_files(options):
621
+ env_files = options.get('env_file', [])
622
+ if not isinstance(env_files, list):
623
+ env_files = [env_files]
624
+ return env_files
625
+
626
627
def merge_environment(options):
628
env = {}
629
- if 'env_file' in options:
- if isinstance(options['env_file'], list):
- for f in options['env_file']:
- env.update(env_vars_from_file(f))
- else:
- env.update(env_vars_from_file(options['env_file']))
630
+ for f in get_env_files(options):
631
+ env.update(env_vars_from_file(f))
632
633
if 'environment' in options:
634
if isinstance(options['environment'], list):
0 commit comments