mirror of
https://github.com/docker/compose.git
synced 2025-04-08 17:05:13 +02:00
Pass the interpolation value to python-dotenv
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
This commit is contained in:
parent
f17e7268b0
commit
edf27e486a
@ -39,8 +39,10 @@ def env_vars_from_file(filename, interpolate=True):
|
|||||||
elif not os.path.isfile(filename):
|
elif not os.path.isfile(filename):
|
||||||
raise EnvFileNotFound("{} is not a file.".format(filename))
|
raise EnvFileNotFound("{} is not a file.".format(filename))
|
||||||
|
|
||||||
# TODO: now we should do something with interpolate here, but what?
|
env = dotenv.dotenv_values(dotenv_path=filename, encoding='utf-8-sig', interpolate=interpolate)
|
||||||
return dotenv.dotenv_values(dotenv_path=filename, encoding='utf-8-sig')
|
for k, v in env.items():
|
||||||
|
env[k] = v if interpolate else v.replace('$', '$$')
|
||||||
|
return env
|
||||||
|
|
||||||
|
|
||||||
class Environment(dict):
|
class Environment(dict):
|
||||||
|
@ -10,6 +10,7 @@ dockerpty==0.4.1
|
|||||||
docopt==0.6.2
|
docopt==0.6.2
|
||||||
enum34==1.1.6; python_version < '3.4'
|
enum34==1.1.6; python_version < '3.4'
|
||||||
functools32==3.2.3.post2; python_version < '3.2'
|
functools32==3.2.3.post2; python_version < '3.2'
|
||||||
|
git+git://github.com/ulyssessouza/python-dotenv.git@no-interpolate#egg=python-dotenv
|
||||||
idna==2.8
|
idna==2.8
|
||||||
ipaddress==1.0.23
|
ipaddress==1.0.23
|
||||||
jsonschema==3.2.0
|
jsonschema==3.2.0
|
||||||
@ -17,7 +18,7 @@ paramiko==2.7.1
|
|||||||
pypiwin32==219; sys_platform == 'win32' and python_version < '3.6'
|
pypiwin32==219; sys_platform == 'win32' and python_version < '3.6'
|
||||||
pypiwin32==223; sys_platform == 'win32' and python_version >= '3.6'
|
pypiwin32==223; sys_platform == 'win32' and python_version >= '3.6'
|
||||||
PySocks==1.7.1
|
PySocks==1.7.1
|
||||||
python-dotenv==0.10.5
|
#python-dotenv==0.10.5
|
||||||
PyYAML==5.3
|
PyYAML==5.3
|
||||||
requests==2.22.0
|
requests==2.22.0
|
||||||
six==1.12.0
|
six==1.12.0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user