1
0
Fork 0

use existing function

pull/1666/head
bethanyj28 2024-02-23 08:28:37 -05:00
parent 83731e6528
commit 1e326de474
1 changed files with 4 additions and 1 deletions

View File

@ -97,9 +97,12 @@ export async function streamExtractExternal(
const fullPath = path.normalize(path.join(directory, entry.path)) const fullPath = path.normalize(path.join(directory, entry.path))
core.debug(`Extracting artifact entry: ${fullPath}`) core.debug(`Extracting artifact entry: ${fullPath}`)
if (entry.type === 'Directory') { if (entry.type === 'Directory') {
promises.push(fs.mkdir(fullPath, {recursive: true}).then(() => {})) promises.push(resolveOrCreateDirectory(fullPath).then(() => {}))
entry.autodrain() entry.autodrain()
} else { } else {
promises.push(
resolveOrCreateDirectory(path.dirname(fullPath)).then(() => {})
)
const writeStream = createWriteStream(fullPath) const writeStream = createWriteStream(fullPath)
promises.push( promises.push(
new Promise((resolve, reject) => { new Promise((resolve, reject) => {