From ddabd8c1024809a31ec01d7907de4b0dcd49ba63 Mon Sep 17 00:00:00 2001 From: Sergio <77530549+sergi0g@users.noreply.github.com> Date: Fri, 7 Mar 2025 17:37:56 +0200 Subject: [PATCH] fix: strip hash when parsing image references --- src/utils/reference.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/reference.rs b/src/utils/reference.rs index 8d544b4..ed26fa2 100644 --- a/src/utils/reference.rs +++ b/src/utils/reference.rs @@ -16,7 +16,7 @@ pub fn split(reference: &str) -> (String, String, String) { } } }; - let splits = repository_and_tag.split(':').collect::>(); + let splits = repository_and_tag.split('@').next().unwrap().split(':').collect::>(); let (repository, tag) = match splits.len() { 1 | 2 => { let repository_components = splits[0].split('/').collect::>(); @@ -38,7 +38,7 @@ pub fn split(reference: &str) -> (String, String, String) { }; (repository, tag) } - _ => unreachable!(), + _ => {dbg!(splits); panic!()}, }; (registry.to_string(), repository, tag.to_string()) }