|
28 | 28 | _logger_validation_warnings, compute_checksums,
|
29 | 29 | normalizeFilesDirs, shortname, uniquename)
|
30 | 30 | from .stdfsaccess import StdFsAccess
|
31 |
| -from .utils import aslist, docker_windows_path_adjust, convert_pathsep_to_unix |
| 31 | +from .utils import aslist, docker_windows_path_adjust, convert_pathsep_to_unix, windows_default_container_id, onWindows |
32 | 32 | from six.moves import map
|
33 | 33 |
|
34 | 34 | ACCEPTLIST_EN_STRICT_RE = re.compile(r"^[a-zA-Z0-9._+-]+$")
|
35 | 35 | ACCEPTLIST_EN_RELAXED_RE = re.compile(r".*") # Accept anything
|
36 | 36 | ACCEPTLIST_RE = ACCEPTLIST_EN_STRICT_RE
|
| 37 | +DEFAULT_CONTAINER_MSG="""We are on Microsoft Windows and not all components of this CWL description have a |
| 38 | +container specified. This means that these steps will be executed in the default container, |
| 39 | +which is %s. |
37 | 40 |
|
| 41 | +Note, this could affect portability if this CWL description relies on non-POSIX features |
| 42 | +or commands in this container. For best results add the following to your CWL |
| 43 | +description's hints section: |
| 44 | +
|
| 45 | +hints: |
| 46 | + DockerRequirement: |
| 47 | + dockerPull: %s |
| 48 | +""" |
38 | 49 |
|
39 | 50 | _logger = logging.getLogger("cwltool")
|
40 | 51 |
|
@@ -189,6 +200,8 @@ def makeJobRunner(self, use_container=True): # type: (Optional[bool]) -> JobBas
|
189 | 200 | "dockerPull": default_container
|
190 | 201 | })
|
191 | 202 | dockerReq = self.requirements[0]
|
| 203 | + if default_container == windows_default_container_id and use_container and onWindows(): |
| 204 | + _logger.warning(DEFAULT_CONTAINER_MSG%(windows_default_container_id, windows_default_container_id)) |
192 | 205 |
|
193 | 206 | if dockerReq and use_container:
|
194 | 207 | return DockerCommandLineJob()
|
|
0 commit comments