m/cup
1
0
mirror of https://github.com/sergi0g/cup.git synced 2025-11-14 08:03:48 -05:00

Fix bug in unsplit_image

This commit is contained in:
Sergio
2024-07-10 09:36:57 +03:00
parent b11b2861ab
commit fa74e01dac

View File

@@ -54,8 +54,8 @@ pub fn split_image(image: &str) -> (String, String, String) {
pub fn unsplit_image(registry: &str, repository: &str, tag: &str) -> String {
let reg = match registry {
"registry-1.docker.io" => "",
r => &format!("{}/", r),
"registry-1.docker.io" => String::new(),
r => format!("{}/", r),
};
let repo = match repository.split('/').collect::<Vec<&str>>()[0] {
"library" => repository.strip_prefix("library/").unwrap(),