File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 2626)
2727from pydra .compose import base
2828from pydra .compose .base .field import RequirementSet
29- from pydra .environments .base import Container
3029from pydra .compose .base .helpers import is_set
3130from . import field
3231from .templating import (
@@ -255,7 +254,8 @@ class ShellTask(base.Task[ShellOutputsType]):
255254
256255 def _run (self , job : "Job[ShellTask]" , rerun : bool = True ) -> None :
257256 """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 :
259259 raise ValueError (
260260 "executable is not set, and the environment is not a container "
261261 f"({ job .environment } ) with an entrypoint"
Original file line number Diff line number Diff line change @@ -26,6 +26,8 @@ class Environment:
2626 TODO: add setup and teardown methods
2727 """
2828
29+ has_entrypoint = False
30+
2931 def setup (self ):
3032 pass
3133
@@ -107,6 +109,8 @@ class Container(Environment):
107109 Extra arguments to be passed to the container
108110 """
109111
112+ has_entrypoint = True
113+
110114 image : str
111115 tag : str = "latest"
112116 root : str = "/mnt/pydra"
You can’t perform that action at this time.
0 commit comments