From e94937595bfc34ac5fc40ddc56b57b7e346c9a42 Mon Sep 17 00:00:00 2001 From: bethanyj28 Date: Wed, 3 Apr 2024 14:06:37 -0400 Subject: [PATCH] add throw to function --- packages/artifact/src/internal/upload/zip.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/artifact/src/internal/upload/zip.ts b/packages/artifact/src/internal/upload/zip.ts index 4dbcda2e..3dd7390b 100644 --- a/packages/artifact/src/internal/upload/zip.ts +++ b/packages/artifact/src/internal/upload/zip.ts @@ -72,8 +72,9 @@ export async function createZipUploadStream( function (err, entry) { if (err) { core.error('A file entry error occurred:', err) + throw new Error('An error occurred during file entry') } - core.debug(`File entry was succesfull: ${entry}`) + core.debug(`File entry was succesful: ${entry}`) } ) @@ -86,8 +87,9 @@ export async function createZipUploadStream( function (err, entry) { if (err) { core.error('A directory entry error occurred:', err) + throw new Error('An error occurred during directory entry') } - core.debug(`File entry was succesfull: ${entry}`) + core.debug(`File entry was succesful: ${entry}`) } ) )