Skip to content

Commit d827a30

Browse files
Update ramalama/compose.py
Supporting condition to handle 'oci://' prefix for RAG source for consistency. Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
1 parent 7021e4f commit d827a30

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

ramalama/compose.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,11 @@ def _gen_rag_volume(self) -> str:
6060
rag_source = self.args.rag
6161
volume_str = ""
6262

63-
if rag_source.startswith("oci:"):
64-
oci_image = rag_source.removeprefix("oci:")
63+
if rag_source.startswith("oci:") or rag_source.startswith("oci://"):
64+
if rag_source.startswith("oci://"):
65+
oci_image = rag_source.removeprefix("oci://")
66+
else:
67+
oci_image = rag_source.removeprefix("oci:")
6568
# This is the standard long-form syntax for image volumes, now supported by Docker.
6669
volume_str = f"""
6770
- type: image

0 commit comments

Comments
 (0)