Merge pull request #221 from amartin120/fix-file-logging

fix logging for files
This commit is contained in:
Adam Martin
2024-04-01 12:45:58 -04:00
committed by GitHub

View File

@@ -41,8 +41,7 @@ func AddFileCmd(ctx context.Context, o *AddFileOpts, s *store.Layout, reference
func storeFile(ctx context.Context, s *store.Layout, fi v1alpha1.File) error {
l := log.FromContext(ctx)
l.Infof("adding 'file' [%s] to the store", fi.Name)
copts := getter.ClientOptions{
NameOverride: fi.Name,
}
@@ -53,6 +52,7 @@ func storeFile(ctx context.Context, s *store.Layout, fi v1alpha1.File) error {
return err
}
l.Infof("adding 'file' [%s] to the store as [%s]", fi.Path, ref.Name())
_, err = s.AddOCI(ctx, f, ref.Name())
if err != nil {
return err