Skip to content

Commit

Permalink
also check for z in the re-duplication code
Browse files Browse the repository at this point in the history
  • Loading branch information
bernt-matthias committed Oct 29, 2024
1 parent 8fd56f3 commit f007331
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/galaxy/tool_util/deps/container_volumes.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@


class ContainerVolume(metaclass=ABCMeta):
valid_modes = frozenset({"ro", "rw"})
valid_modes = frozenset({"ro", "rw", "z"})

def __init__(self, path: str, host_path: Optional[str] = None, mode: Optional[str] = None):
self.path = path
Expand Down Expand Up @@ -50,7 +50,7 @@ def from_str(cls, as_str: str) -> "DockerVolume":
kwds["path"] = kwds["host_path"]
elif len(parts) == 2:
# /host_path:mode is not (or is no longer?) valid Docker volume syntax
if parts[1] in DockerVolume.valid_modes:
if any(mode_part not in DockerVolume.valid_modes for mode_part in parts[1].split(",")) :
kwds["mode"] = parts[1]
kwds["path"] = kwds["host_path"]
else:
Expand Down

0 comments on commit f007331

Please sign in to comment.