Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 18 additions & 9 deletions src/cwl_utils/sandboxjs.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,16 +367,25 @@ def new_js_proc(
if force_docker_pull:
nodejs_pull_commands.append("--force")
nodejs_pull_commands.append(nodeimg)
cwd = singularity_cache or Path.cwd()
nodejsimg = subprocess.check_output( # nosec
nodejs_pull_commands, text=True, cwd=str(cwd)
)
_logger.debug(
"Pulled Docker image %s %s using %s",
nodeimg,
nodejsimg,
container_engine,
cwd = (
Path(singularity_cache) if singularity_cache else Path.cwd()
)
try:
nodejsimg = subprocess.check_output( # nosec
nodejs_pull_commands, text=True, cwd=str(cwd)
)
_logger.debug(
"Pulled Docker image %s %s using %s",
nodeimg,
nodejsimg,
container_engine,
)
except (subprocess.CalledProcessError, OSError) as err:
if not (
need_singularity
and glob.glob(str(cwd / "node_alpine.sif"))
):
raise err
self.have_node_slim = True
nodejs_commands = [container_engine]
if (
Expand Down