瀏覽代碼

fix(push): Fix unexpected EOF on alpha publish

Signed-off-by: Suleiman Dibirov <[email protected]>
Suleiman Dibirov 1 年之前
父節點
當前提交
d9df7aab6e
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      internal/ocipush/push.go

+ 1 - 1
internal/ocipush/push.go

@@ -179,7 +179,7 @@ func generateManifest(layers []v1.Descriptor, ociCompat api.OCIVersion) ([]Pusha
 		config = v1.DescriptorEmptyJSON
 		artifactType = ComposeProjectArtifactType
 		// N.B. the descriptor has the data embedded in it
-		toPush = append(toPush, Pushable{Descriptor: config, Data: nil})
+		toPush = append(toPush, Pushable{Descriptor: config, Data: make([]byte, len(config.Data))})
 	default:
 		return nil, fmt.Errorf("unsupported OCI version: %s", ociCompat)
 	}