@@ -521,20 +521,19 @@ def main(argsl=None, # type: List[str]
521
521
# shared volumes in Docker for Mac
522
522
# More info: https://dockstore.org/docs/faq
523
523
if sys .platform == "darwin" :
524
- tmp_prefix = "tmp_outdir_prefix"
525
524
default_mac_path = "/private/tmp/docker_tmp"
526
- if getattr ( args , tmp_prefix ) and getattr ( args , tmp_prefix ) == DEFAULT_TMP_PREFIX :
527
- setattr ( args , tmp_prefix , default_mac_path )
525
+ if runtimeContext . tmp_outdir_prefix == DEFAULT_TMP_PREFIX :
526
+ runtimeContext . tmp_outdir_prefix = default_mac_path
528
527
529
528
for dirprefix in ("tmpdir_prefix" , "tmp_outdir_prefix" , "cachedir" ):
530
- if getattr (args , dirprefix ) and getattr (args , dirprefix ) != DEFAULT_TMP_PREFIX :
531
- sl = "/" if getattr (args , dirprefix ).endswith ("/" ) or dirprefix == "cachedir" \
529
+ if getattr (runtimeContext , dirprefix ) and getattr (runtimeContext , dirprefix ) != DEFAULT_TMP_PREFIX :
530
+ sl = "/" if getattr (runtimeContext , dirprefix ).endswith ("/" ) or dirprefix == "cachedir" \
532
531
else ""
533
- setattr (args , dirprefix ,
534
- os .path .abspath (getattr (args , dirprefix )) + sl )
535
- if not os .path .exists (os .path .dirname (getattr (args , dirprefix ))):
532
+ setattr (runtimeContext , dirprefix ,
533
+ os .path .abspath (getattr (runtimeContext , dirprefix )) + sl )
534
+ if not os .path .exists (os .path .dirname (getattr (runtimeContext , dirprefix ))):
536
535
try :
537
- os .makedirs (os .path .dirname (getattr (args , dirprefix )))
536
+ os .makedirs (os .path .dirname (getattr (runtimeContext , dirprefix )))
538
537
except Exception as e :
539
538
_logger .error ("Failed to create directory: %s" , e )
540
539
return 1
0 commit comments