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