From 48edeb6a7c192da2e65695871a65e25dc109dfbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Leszczy=C5=84ski?= <2000michal@wp.pl> Date: Fri, 22 Mar 2024 14:11:08 +0100 Subject: [PATCH] fix(cmd/agent): load index into memory in download-files Fixes #3761 --- pkg/cmd/agent/download_files.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/cmd/agent/download_files.go b/pkg/cmd/agent/download_files.go index 2f69e960de..7dbfcc1253 100644 --- a/pkg/cmd/agent/download_files.go +++ b/pkg/cmd/agent/download_files.go @@ -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 {