From 688eb8b5d35c54d7ba4c3e7bb9c2cb55bc85daca Mon Sep 17 00:00:00 2001 From: zongz Date: Tue, 4 Jun 2024 16:18:04 +0800 Subject: [PATCH] fix: fix e2e test case Signed-off-by: zongz --- pkg/opt/opt.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/opt/opt.go b/pkg/opt/opt.go index 74ff6c11..f974e53a 100644 --- a/pkg/opt/opt.go +++ b/pkg/opt/opt.go @@ -286,7 +286,11 @@ func NewOciOptionsFromRef(refStr string, settings *settings.Settings) (*OciOptio if err != nil { return nil, err } - repo = fmt.Sprintf("%s/%s", repo, pkgName) + if !strings.HasPrefix(pkgName, "/") { + repo = fmt.Sprintf("%s/%s", repo, pkgName) + } else { + repo = fmt.Sprintf("%s%s", repo, pkgName) + } } else { reg = ref.Registry repo = ref.Repository