Skip to content

Commit

Permalink
fix(cmd/agent): load index into memory in download-files
Browse files Browse the repository at this point in the history
Fixes #3761
  • Loading branch information
Michal-Leszczynski committed Mar 22, 2024
1 parent 377610a commit 48edeb6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/cmd/agent/download_files.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,13 +149,16 @@ var downloadFilesCmd = &cobra.Command{
if err != nil {
return errors.Wrap(err, "lookup manifest")
}
if err := m.LoadIndex(); err != nil {
return errors.Wrap(err, "load index")
}

// Handle action flags that work with the manifest
switch {
case a.dumpManifest:
enc := json.NewEncoder(w)
enc.SetIndent("", " ")
return enc.Encode(m.ManifestContent)
return enc.Encode(m.ManifestContentWithIndex)
case a.dumpTokens:
for i := range m.Tokens {
if i > 0 {
Expand Down

0 comments on commit 48edeb6

Please sign in to comment.