Account for case-insensitive env on windows platform
Signed-off-by: Joffrey F <joffrey@docker.com>
This commit is contained in:
parent
36f1b4589c
commit
c7afe16419
1 changed files with 6 additions and 0 deletions
|
|
@ -7,6 +7,7 @@ import os
|
||||||
|
|
||||||
import six
|
import six
|
||||||
|
|
||||||
|
from ..const import IS_WINDOWS_PLATFORM
|
||||||
from .errors import ConfigurationError
|
from .errors import ConfigurationError
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
@ -58,6 +59,11 @@ class Environment(dict):
|
||||||
try:
|
try:
|
||||||
return super(Environment, self).__getitem__(key)
|
return super(Environment, self).__getitem__(key)
|
||||||
except KeyError:
|
except KeyError:
|
||||||
|
if IS_WINDOWS_PLATFORM:
|
||||||
|
try:
|
||||||
|
return super(Environment, self).__getitem__(key.upper())
|
||||||
|
except KeyError:
|
||||||
|
pass
|
||||||
if key not in self.missing_keys:
|
if key not in self.missing_keys:
|
||||||
log.warn(
|
log.warn(
|
||||||
"The {} variable is not set. Defaulting to a blank string."
|
"The {} variable is not set. Defaulting to a blank string."
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue