From 1e326de4744cd44f766a6a1ca03f6fcb532a9fcc Mon Sep 17 00:00:00 2001 From: bethanyj28 Date: Fri, 23 Feb 2024 08:28:37 -0500 Subject: [PATCH] use existing function --- packages/artifact/src/internal/download/download-artifact.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/artifact/src/internal/download/download-artifact.ts b/packages/artifact/src/internal/download/download-artifact.ts index cd2f8490..f040d2f5 100644 --- a/packages/artifact/src/internal/download/download-artifact.ts +++ b/packages/artifact/src/internal/download/download-artifact.ts @@ -97,9 +97,12 @@ export async function streamExtractExternal( const fullPath = path.normalize(path.join(directory, entry.path)) core.debug(`Extracting artifact entry: ${fullPath}`) if (entry.type === 'Directory') { - promises.push(fs.mkdir(fullPath, {recursive: true}).then(() => {})) + promises.push(resolveOrCreateDirectory(fullPath).then(() => {})) entry.autodrain() } else { + promises.push( + resolveOrCreateDirectory(path.dirname(fullPath)).then(() => {}) + ) const writeStream = createWriteStream(fullPath) promises.push( new Promise((resolve, reject) => {