go-tuf icon indicating copy to clipboard operation
go-tuf copied to clipboard

Unexpected behavior: passing empty slice of paths to AddTargets* functions adds all staged targets instead of none

Open ethan-lowman-dd opened this issue 3 years ago • 1 comments

ethan-lowman-dd avatar Mar 27 '22 01:03 ethan-lowman-dd

It also seems like this adds all staged targets to the a delegation if we do something like: repo.AddTargetsWithExpiresToPreferredRole([]string{}, nil, expiration, delegation-foo)

for better (bad) compatibility, could we restrict this to when the preferred role is the top-level targets, and not any targets file? (i.e. disclude delegations)

asraa avatar Mar 31 '22 13:03 asraa

Closing since the code base changed and is no longer relevant

Thanks for raising this 👍

rdimitrov avatar Jan 31 '24 21:01 rdimitrov