|
17 | 17 | import ruamel.yaml as yaml
|
18 | 18 | import schema_salad.validate as validate
|
19 | 19 | import six
|
| 20 | + |
| 21 | +from cwltool.argparser import DEFAULT_TMP_PREFIX |
20 | 22 | from schema_salad.ref_resolver import Loader, file_uri, uri_file_path
|
21 | 23 | from schema_salad.sourceline import strip_dup_lineno
|
22 | 24 |
|
@@ -529,8 +531,16 @@ def main(argsl=None, # type: List[str]
|
529 | 531 | if isinstance(tool, int):
|
530 | 532 | return tool
|
531 | 533 |
|
| 534 | + # If on MacOS platform, TMPDIR must be set to be under one of the shared volumes in Docker for Mac |
| 535 | + # More info: https://dockstore.org/docs/faq |
| 536 | + if sys.platform == "darwin": |
| 537 | + tmp_prefix = "tmp_outdir_prefix" |
| 538 | + default_mac_path = "/private/tmp/docker_tmp" |
| 539 | + if getattr(args, tmp_prefix) and getattr(args, tmp_prefix) == DEFAULT_TMP_PREFIX: |
| 540 | + setattr(args, tmp_prefix, default_mac_path) |
| 541 | + |
532 | 542 | for dirprefix in ("tmpdir_prefix", "tmp_outdir_prefix", "cachedir"):
|
533 |
| - if getattr(args, dirprefix) and getattr(args, dirprefix) != 'tmp': |
| 543 | + if getattr(args, dirprefix) and getattr(args, dirprefix) != DEFAULT_TMP_PREFIX: |
534 | 544 | sl = "/" if getattr(args, dirprefix).endswith("/") or dirprefix == "cachedir" else ""
|
535 | 545 | setattr(args, dirprefix,
|
536 | 546 | os.path.abspath(getattr(args, dirprefix)) + sl)
|
|
0 commit comments