mirror of
https://github.com/docker/compose.git
synced 2025-07-29 16:44:20 +02:00
Better windows support for Environment class
Signed-off-by: Joffrey F <joffrey@docker.com>
This commit is contained in:
parent
b99037b4a6
commit
1506f997de
@ -72,3 +72,19 @@ class Environment(dict):
|
|||||||
self.missing_keys.append(key)
|
self.missing_keys.append(key)
|
||||||
|
|
||||||
return ""
|
return ""
|
||||||
|
|
||||||
|
def __contains__(self, key):
|
||||||
|
result = super(Environment, self).__contains__(key)
|
||||||
|
if IS_WINDOWS_PLATFORM:
|
||||||
|
return (
|
||||||
|
result or super(Environment, self).__contains__(key.upper())
|
||||||
|
)
|
||||||
|
return result
|
||||||
|
|
||||||
|
def get(self, key, *args, **kwargs):
|
||||||
|
if IS_WINDOWS_PLATFORM:
|
||||||
|
return super(Environment, self).get(
|
||||||
|
key,
|
||||||
|
super(Environment, self).get(key.upper(), *args, **kwargs)
|
||||||
|
)
|
||||||
|
return super(Environment, self).get(key, *args, **kwargs)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user