@@ -149,7 +149,7 @@ func Generate(images []string, platform string, insecure bool, imageLayerCachePa
149149 }
150150 }
151151
152- if err := os .WriteFile (filepath .Join (digestDir , rmt .Digest .String ()), manifest , 0o644 ); err != nil {
152+ if err := os .WriteFile (filepath .Join (digestDir , strings . ReplaceAll ( rmt .Digest .String (), "sha256:" , "sha256-" )), manifest , 0o644 ); err != nil {
153153 return err
154154 }
155155
@@ -182,7 +182,7 @@ func Generate(images []string, platform string, insecure bool, imageLayerCachePa
182182 return fmt .Errorf ("platform manifest hash: %w" , err )
183183 }
184184
185- if err := os .WriteFile (filepath .Join (digestDir , fmt .Sprintf ("sha256: %x" , h .Sum (nil ))), platformManifest , 0o644 ); err != nil {
185+ if err := os .WriteFile (filepath .Join (digestDir , fmt .Sprintf ("sha256- %x" , h .Sum (nil ))), platformManifest , 0o644 ); err != nil {
186186 return err
187187 }
188188
@@ -191,7 +191,7 @@ func Generate(images []string, platform string, insecure bool, imageLayerCachePa
191191 return fmt .Errorf ("getting image config hash: %w" , err )
192192 }
193193
194- if err := os .WriteFile (filepath .Join (tmpDir , blobsDir , configHash .String ()), config , 0o644 ); err != nil {
194+ if err := os .WriteFile (filepath .Join (tmpDir , blobsDir , strings . ReplaceAll ( configHash .String (), "sha256:" , "sha256-" )), config , 0o644 ); err != nil {
195195 return err
196196 }
197197
@@ -244,7 +244,7 @@ func processLayer(layer v1.Layer, dstDir string) error {
244244 return fmt .Errorf ("getting layer digest: %w" , err )
245245 }
246246
247- blobPath := filepath .Join (dstDir , blobsDir , digest .String ())
247+ blobPath := filepath .Join (dstDir , blobsDir , strings . ReplaceAll ( digest .String (), "sha256:" , "sha256-" ))
248248
249249 if _ , err := os .Stat (blobPath ); err == nil {
250250 // we already have this blob, skip it
0 commit comments