File tree 2 files changed +6
-2
lines changed
2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 26
26
)
27
27
from pydra .compose import base
28
28
from pydra .compose .base .field import RequirementSet
29
- from pydra .environments .base import Container
30
29
from pydra .compose .base .helpers import is_set
31
30
from . import field
32
31
from .templating import (
@@ -255,7 +254,8 @@ class ShellTask(base.Task[ShellOutputsType]):
255
254
256
255
def _run (self , job : "Job[ShellTask]" , rerun : bool = True ) -> None :
257
256
"""Run the shell command."""
258
- if self .executable is None and not isinstance (job .environment , Container ):
257
+
258
+ if self .executable is None and not job .environment .has_entrypoint :
259
259
raise ValueError (
260
260
"executable is not set, and the environment is not a container "
261
261
f"({ job .environment } ) with an entrypoint"
Original file line number Diff line number Diff line change @@ -26,6 +26,8 @@ class Environment:
26
26
TODO: add setup and teardown methods
27
27
"""
28
28
29
+ has_entrypoint = False
30
+
29
31
def setup (self ):
30
32
pass
31
33
@@ -107,6 +109,8 @@ class Container(Environment):
107
109
Extra arguments to be passed to the container
108
110
"""
109
111
112
+ has_entrypoint = True
113
+
110
114
image : str
111
115
tag : str = "latest"
112
116
root : str = "/mnt/pydra"
You can’t perform that action at this time.
0 commit comments