Fix --name option in "store add file" command

Fixes: #196

Signed-off-by: Francesco Giudici <francesco.giudici@suse.com>
This commit is contained in:
Francesco Giudici
2024-02-27 09:54:48 +01:00
parent d136d1bfd2
commit 8120537af2

View File

@@ -33,7 +33,9 @@ func AddFileCmd(ctx context.Context, o *AddFileOpts, s *store.Layout, reference
cfg := v1alpha1.File{
Path: reference,
}
if len(o.Name) > 0 {
cfg.Name = o.Name
}
return storeFile(ctx, s, cfg)
}