Skip to content

Commit

Permalink
fix(offline-update): Pull prod meta if wave is specified
Browse files Browse the repository at this point in the history
Make sure that the production root role metadata are pulled if a user
specified that one of the wave targets should be downloaded and prepared
for offline update.

Signed-off-by: Mike Sul <[email protected]>
  • Loading branch information
mike-sul committed Mar 28, 2024
1 parent 5d34384 commit bdd7d46
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion subcommands/targets/offline-update.go
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ func downloadTufRepo(factory string, target string, tag string, prod bool, wave
// v2 - auto-generated by ota-lite to take keys online (default, on Factory creation);
ver := 3
downloadMetadataFile := func(metadataFileName string) error {
data, err := api.TufMetadataGet(factory, metadataFileName, tag, prod)
data, err := api.TufMetadataGet(factory, metadataFileName, tag, prod || len(wave) > 0)
if err != nil {
return err
}
Expand Down

0 comments on commit bdd7d46

Please sign in to comment.