Skip to content

Commit 91a88ee

Browse files
author
Peter Amstutz
committed
Support --tmp-outdir-prefix
1 parent 028e93a commit 91a88ee

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

cwltool_service.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ def main(args=None):
1616
print "Workflow must be on command line"
1717
return 1
1818

19+
parser = cwltool.main.arg_parser()
20+
parsedargs = parser.parse_args(args)
21+
1922
a = True
2023
while a:
2124
a = True
@@ -24,10 +27,12 @@ def main(args=None):
2427
a = sys.stdin.readline()
2528
msg += a
2629

30+
outdir = tempfile.mkdtemp("", parsedargs.tmp_outdir_prefix)
31+
2732
t = tempfile.NamedTemporaryFile()
2833
t.write(msg)
2934
t.flush()
30-
if cwltool.main.main([args[0], t.name]) != 0:
35+
if cwltool.main.main(["--outdir="+outdir] + args + [t.name]) != 0:
3136
return 1
3237
sys.stdout.write("\n\n")
3338

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
'cwltool'
2525
],
2626
entry_points={
27-
'console_scripts': [ "cwltool-service=cwl_service:main" ]
27+
'console_scripts': [ "cwltool-service=cwltool_service:main" ]
2828
},
2929
zip_safe=True
3030
)

0 commit comments

Comments
 (0)