Skip to content

Commit 3f385ec

Browse files
author
Peter Amstutz
committed
Capture stdout from node:slim docker pull so it doesn't contaminate the final
output.
1 parent eac895b commit 3f385ec

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

cwltool/sandboxjs.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,13 @@
22
import json
33
import threading
44
import errno
5+
import logging
56

67
class JavascriptException(Exception):
78
pass
89

10+
_logger = logging.getLogger("cwltool")
11+
912
def execjs(js, jslib, timeout=None):
1013
nodejs = None
1114
trynodes = (["nodejs"], ["node"])
@@ -24,7 +27,8 @@ def execjs(js, jslib, timeout=None):
2427
nodeimg = "node:slim"
2528
dlist = subprocess.check_output(["docker", "images", nodeimg])
2629
if "node" not in dlist:
27-
subprocess.check_call(["docker", "pull", nodeimg])
30+
nodejsimg = subprocess.check_output(["docker", "pull", nodeimg])
31+
_logger.info("Pulled Docker image %s %s", nodeimg, nodejsimg)
2832
nodejs = subprocess.Popen(["docker", "run",
2933
"--attach=STDIN", "--attach=STDOUT", "--attach=STDERR",
3034
"--sig-proxy=true", "--interactive",

0 commit comments

Comments
 (0)