diff --git a/cmd/hauler/cli/store/extract.go b/cmd/hauler/cli/store/extract.go index 73da37d2..ade07c2d 100644 --- a/cmd/hauler/cli/store/extract.go +++ b/cmd/hauler/cli/store/extract.go @@ -23,10 +23,12 @@ func ExtractCmd(ctx context.Context, o *flags.ExtractOpts, s *store.Layout, ref return err } + // use the repository from the context and the identifier from the reference + repo := r.Context().RepositoryStr() + ":" + r.Identifier() + found := false if err := s.Walk(func(reference string, desc ocispec.Descriptor) error { - - if !strings.Contains(reference, r.Name()) { + if !strings.Contains(reference, repo) { return nil } found = true