diff --git a/ramalama/cli.py b/ramalama/cli.py index 276a687c0..74a7af612 100644 --- a/ramalama/cli.py +++ b/ramalama/cli.py @@ -483,6 +483,8 @@ def _list_models_from_store(args): if model.startswith("huggingface://"): model = model.replace("huggingface://", "hf://", 1) + + if not model.startswith("ollama://") and not model.startswith("oci://"): model = model.removesuffix(":latest") size_sum = 0 diff --git a/test/system/050-pull.bats b/test/system/050-pull.bats index 698f27d7b..518c56ec9 100644 --- a/test/system/050-pull.bats +++ b/test/system/050-pull.bats @@ -141,7 +141,7 @@ load setup_suite run_ramalama pull $file_url run_ramalama list # remove the additional slash character - expected_url=$(sed "s/file\:\//file\:/" <<< $file_url):latest + expected_url=$(sed "s/file\:\//file\:/" <<< $file_url) is "$output" ".*$expected_url" "URL exists" run_ramalama rm $file_url run_ramalama list @@ -163,7 +163,7 @@ load setup_suite touch $model url=file://${model} # remove the additional slash character - expected_url=$(sed "s/file\:\//file\:/" <<< $url):latest + expected_url=$(sed "s/file\:\//file\:/" <<< $url) run_ramalama pull $url run_ramalama list