From 5f62f1e65ba5d59c8c7ec0bb0387358c8d905263 Mon Sep 17 00:00:00 2001 From: Robin Munn Date: Mon, 29 Apr 2024 11:22:16 +0700 Subject: [PATCH] Prevent "too many open files" in artifact upload See https://www.archiverjs.com/docs/archiver/#file --- packages/artifact/src/internal/upload/zip.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/artifact/src/internal/upload/zip.ts b/packages/artifact/src/internal/upload/zip.ts index cf1f8dd4..622ff25f 100644 --- a/packages/artifact/src/internal/upload/zip.ts +++ b/packages/artifact/src/internal/upload/zip.ts @@ -44,7 +44,7 @@ export async function createZipUploadStream( for (const file of uploadSpecification) { if (!file.stats.isDirectory()) { // Add a normal file to the zip - zip.append(createReadStream(file.sourcePath), { + zip.file(file.sourcePath, { name: file.destinationPath, stats: file.stats, mode: file.stats.mode