fix logging for files

Signed-off-by: Adam Martin <adam.martin@rancherfederal.com>
This commit is contained in:
Adam Martin
2024-04-01 12:23:05 -04:00
parent b18f55ea60
commit eb810c16f5

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