Skip to content

Commit 8b85f34

Browse files
committed
be case insensitive when comparing paths
1 parent 098b15b commit 8b85f34

File tree

1 file changed

+16
-9
lines changed

1 file changed

+16
-9
lines changed

cwltool/docker.py

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,21 +36,26 @@ def _get_docker_machine_mounts(): # type: () -> List[Text]
3636
if 'DOCKER_MACHINE_NAME' not in os.environ:
3737
__docker_machine_mounts = []
3838
else:
39-
__docker_machine_mounts = [u'/' + line.split(None, 1)[0]
40-
for line in subprocess.check_output(
41-
['docker-machine', 'ssh',
42-
os.environ['DOCKER_MACHINE_NAME'],
43-
'mount', '-t', 'vboxsf'],
44-
universal_newlines=True).splitlines()]
39+
__docker_machine_mounts = [
40+
u'/' + line.split(None, 1)[0] for line in
41+
subprocess.check_output(
42+
['docker-machine', 'ssh',
43+
os.environ['DOCKER_MACHINE_NAME'], 'mount', '-t',
44+
'vboxsf'],
45+
universal_newlines=True).splitlines()]
4546
return __docker_machine_mounts
4647

4748
def _check_docker_machine_path(path): # type: (Optional[Text]) -> None
4849
if not path:
4950
return
51+
if onWindows():
52+
path = path.lower()
5053
mounts = _get_docker_machine_mounts()
5154
if mounts:
5255
found = False
5356
for mount in mounts:
57+
if onWindows():
58+
mount = mount.lower()
5459
if path.startswith(mount):
5560
found = True
5661
break
@@ -59,9 +64,11 @@ def _check_docker_machine_path(path): # type: (Optional[Text]) -> None
5964
"Input path {path} is not in the list of host paths mounted "
6065
"into the Docker virtual machine named {name}. Already mounted "
6166
"paths: {mounts}.\n"
62-
"See https://docs.docker.com/toolbox/toolbox_install_windows/#optional-add-shared-directories"
63-
" for instructions on how to add this path to your VM.".format(path=path,
64-
name=os.environ["DOCKER_MACHINE_NAME"], mounts=mounts))
67+
"See https://docs.docker.com/toolbox/toolbox_install_windows/"
68+
"#optional-add-shared-directories for instructions on how to "
69+
"add this path to your VM.".format(
70+
path=path, name=os.environ["DOCKER_MACHINE_NAME"],
71+
mounts=mounts))
6572

6673

6774
class DockerCommandLineJob(ContainerCommandLineJob):

0 commit comments

Comments
 (0)