fix unzip error (#223)

This commit is contained in:
Tony Brix
2019-12-09 13:26:48 -06:00
committed by eric sciple
parent aa13e110b1
commit 1d7e38e56d
2 changed files with 120 additions and 3 deletions

View File

@@ -130,7 +130,7 @@ export async function extract7z(
ok(IS_WINDOWS, 'extract7z() not supported on current OS')
ok(file, 'parameter "file" is required')
dest = dest || (await _createExtractFolder(dest))
dest = await _createExtractFolder(dest)
const originalCwd = process.cwd()
process.chdir(dest)
@@ -199,7 +199,7 @@ export async function extractTar(
throw new Error("parameter 'file' is required")
}
dest = dest || (await _createExtractFolder(dest))
dest = await _createExtractFolder(dest)
const tarPath: string = await io.which('tar', true)
await exec(`"${tarPath}"`, [flags, '-C', dest, '-f', file])
@@ -218,7 +218,7 @@ export async function extractZip(file: string, dest?: string): Promise<string> {
throw new Error("parameter 'file' is required")
}
dest = dest || (await _createExtractFolder(dest))
dest = await _createExtractFolder(dest)
if (IS_WINDOWS) {
await extractZipWin(file, dest)